capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 74 forks source link

Detect if the payment flow has been closed #192

Closed cyrilfr closed 1 year ago

cyrilfr commented 2 years ago

When you call Stripe.presentPaymentFlow() it opens a closable modal sheet. Unfortunately, the return of this function is inconsistent as it's not able to distinguish between the modal sheet being closed or a credit card being selected. Actually if you close it with the cross, you get the cardNumber of the default selected credit card. This is not what's expected.

A solution would be to set cardNumber to null if the modal sheet has been closed or add an extra property to mention the actual behavior like with ion-modal.

cyrilfr commented 2 years ago

The PaymentFlowEventsEnum.Completed event is triggered even after a cancel.

rdlabo commented 1 year ago

Please use issue format. I can't know where platform you talk about.