vsf-external-checkout icon indicating copy to clipboard operation
vsf-external-checkout copied to clipboard

Use POST instead of GET redirect to checkout

Open pkarw opened this issue 5 years ago • 1 comments

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

pkarw avatar Mar 14 '19 10:03 pkarw

Good idea!

Tjitse-E avatar Mar 19 '19 10:03 Tjitse-E