You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose to separate Checkout API from the state machine states: https://docs.sylius.com/en/1.7/api/checkouts.html
I found that it might be useful to have a single endpoint to create an order or/and fill order partially.
Problem
The motivation to create such endpoints is to separate View and Backend logic. Such separation might be useful if we would like to AB test of possible flows of the checkout process (e.g., single-step checkout versus multiple steps checkout). Unfortunately, in the current implementation, it is not possible due to our backend logic strictly describes checkout steps by the state machine configured states.
Solution
Order API
In RESTful terms there should be two endpoints:
with POST method to create order
and PUT/PATCH method to modify the order.
Order finalization might be done during payment creation for a particular order. For example, the order will be marked as paid if payment has been created.
Currently, there no POST and PUT/PATCH methods for:
There should be another endpoint which returns a list of eligible shipping/payment methods based on partially filled order. If there not enough data then error (e.g., 400) should be returned.
Probably, there might be two options: when we provide all required information with request or take information from order otherwise.
The text was updated successfully, but these errors were encountered:
@kayue good catch. There should be another endpoint which returns a list of eligible shipping/payment methods based on partially filled order. If there not enough data then error (e.g., 400) should be returned.
Probably, there might be two options: when we provide all required information with request or take information from order otherwise.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
stalebot
added
Stale
Issues and PRs with no recent activity, about to be closed soon.
and removed
Stale
Issues and PRs with no recent activity, about to be closed soon.
labels
Dec 25, 2020
TL;DR;
I would like to propose to separate Checkout API from the state machine states:
https://docs.sylius.com/en/1.7/api/checkouts.html
I found that it might be useful to have a single endpoint to create an order or/and fill order partially.
Problem
The motivation to create such endpoints is to separate View and Backend logic. Such separation might be useful if we would like to AB test of possible flows of the checkout process (e.g., single-step checkout versus multiple steps checkout). Unfortunately, in the current implementation, it is not possible due to our backend logic strictly describes checkout steps by the state machine configured states.
Solution
Order API
In RESTful terms there should be two endpoints:
Order finalization might be done during payment creation for a particular order. For example, the order will be marked as paid if payment has been created.
Currently, there no POST and PUT/PATCH methods for:
——
UPDATE
Eligible Shipping/Payment API
There should be another endpoint which returns a list of eligible shipping/payment methods based on partially filled order. If there not enough data then error (e.g., 400) should be returned.
Probably, there might be two options: when we provide all required information with request or take information from order otherwise.
The text was updated successfully, but these errors were encountered: