solidus_stripe
solidus_stripe copied to clipboard
Fix payment_intent_unexpected_state error when voiding payment intents
Solves #64
If a payment intent has been created but the order is never completed, Stripe will eventually time out the intent and change its state. When a new payment intent is created, it first tries to void all the previous uncompleted payment intents of the user and this would break with the Stripe error payment_intent_unexpected_state since Stripe's state machine does not allow that change.