vuestorefront / vue-storefront-api

Vue.js storefront for Magento2 (and not only) - data backend
https://www.vuestorefront.io
MIT License
348 stars 338 forks source link

Add Payment Information endpoint #538

Open rain2o opened 3 years ago

rain2o commented 3 years ago

Some payment methods require the user to be redirected from the store to the payment provider's website, and then they will be redirected back to the store. These such payment methods require the payment-information endpoint in Magento 2 to save the order with an unpaid payment method, which will then be updated after a confirmation from the payment provider.

The magento2-rest-client lib already supports this, so a new endpoint in the VSF API needs to be added to support this as well. See https://github.com/DivanteLtd/magento2-rest-client/blob/32fd922ced0ef735b99fd85be0dda6ebcd9eb791/lib/cart.js#L145