Adds a payment provider service that can easily retrieve payment providers

This commit is contained in:
Sebastian Rindom
2020-02-18 14:58:11 +01:00
parent d114b806d6
commit f8fcd5a3dd
7 changed files with 313 additions and 4 deletions

View File

@@ -20,4 +20,23 @@ This is where events live. Want to perform a certain task whenever something els
The core will look for files in the folders listed above, and inject the custom code.
# Checkout flow
To create an order from a cart the customer must have filled in:
- their details (shipping/billing address, email)
- shipping method
- payment method
The steps can be done in any order. The standard path would probably be:
1. submit details (PUT /cart/shipping-address, PUT /cart/email)
2. select shipping method (PUT /cart/shipping-method)
3. enter payment details (PUT /cart/payment-method)
4. complete order (POST /order)
Assuming that shipping methods are static within each region we can display all shipping methods at checkout time. If shipping is dynamically calculated the price of the shipping method may change, we will ask the fulfillment provider for new rates.
Payment details can be entered at any point as long as the final amount is known. If the final amount changes afer the payment details are entered the payment method may therefore be invalidated.
Within the store UI you could imagine each step being taken care of by a single button click, which calls all endpoints.