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.
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 thecardNumber
of the default selected credit card. This is not what's expected.A solution would be to set
cardNumber
tonull
if the modal sheet has been closed or add an extra property to mention the actual behavior like withion-modal
.