vsf-external-checkout
vsf-external-checkout copied to clipboard
Use POST instead of GET redirect to checkout
Currently, VS is syncing the shopping cart with Magento in a sequence of pull/update calls. It's possible, especially when Magento2 API responds slowly - that some of these requests were not executed before User gets redirected to the checkout. In that case, cart might get out of sync.
It would be safer to create the full order object and pass it via POST to Magento2. In that case, the Magento2 module should do the sync of the passed order object with the quote.
Something similar to: https://github.com/DivanteLtd/vue-storefront-api/blob/d8775e903c8f345e86abbad33ff9ac2cef070755/src/platform/magento2/o2m.js#L79
By doing so, we're 100% sure that the magento2 cart is in full sync with VS
Good idea!