[Stripe] handle payment_intent.payment_failed
igoychev opened this issue · comments
Which area(s) of Podkrepi.bg are affected? (leave empty if unsure)
Donations
Describe the feature you'd like to request
When payment is initiated with payment_intent.created event and the card is not accepted by some reason in Stripe, it sends payment_intent.payment_failed event which we currently don't handle.
This results in donations staying in status waiting, however the closest correct status should be 'declined'.
Describe the solution you'd like
Check how @StripeWebhookHandler('payment_intent.canceled') is implemented and add implementation for payment_intent.payment_failed
Testing of stripe events is described here: https://github.com/podkrepi-bg/api/blob/master/TESTING.md
Describe alternatives you've considered
No response