Payment flow never cancel
See original GitHub issuePlatform
- Web
- iOS
- Android
Describe the bug
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 and the PaymentFlowEventsEnum.Completed
event is triggered instead of PaymentFlowEventsEnum.Canceled
. This is not what’s expected.
To Reproduce Steps to reproduce the behavior:
- Call
Stripe.presentPaymentFlow()
- Press the cross to close the modal
- See the
PaymentFlowEventsEnum.Completed
being triggered and the function return the default selected card.
Expected behavior
The PaymentFlowEventsEnum.Canceled
being triggered on cancel.
Edit I tested with the iOS Simulator and that doesn’t work either. The default selected payment method is returned.
Here is a screenshot taken right after presentPaymentFlow()
. Pressing the cross is equivalent to pressing on Google Pay or on the credit card already registered, depending on the default selected payment method.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:22 (13 by maintainers)
OK I though it was used to preset the country when entering credit card detail. My bad.
Thanks.
I released v3.9.1-0. Please try in PaymentSheet method. Thanks.
@cyrilfr