spree_gateway
spree_gateway copied to clipboard
WIP: Add support for Stripe Payment Element
@rafalcymerys @damianlegawiec I have been working on integrating Stripe payment element with Spree Vue (see https://github.com/vuestorefront/spree/pull/257). Here is where I am at with the spree side. Would be great to get your feedback on my current approach, and any suggestions.
Some key points:
- Addition of a new payment state - 'intent', which would be after checkout. This would allow the payment gateway to create the payment intent.
- The Stripe API does not appear to support spree's current implementation of payment profiles (spree uses the 'store' method after payment creation). With payment intents, you need to create the customer and link them to the payment intent when it is created.
- New endpoint to create payment intent.
- New 'Stripe' webhook to handle successful confirmation of payment intent and update order.
TO DO:
- Invalidate payment intent when change to order, or change of payment method.