You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling presentPaymentOptions(from:, completion:) on the PaymentSheet.FlowController it seems to be impossible to detect whether the user actually pressed the CTA "Continue" button or the dismiss button. The paymentOption seems to filled out with the payment data also in the case of an explicit dismissal (where all e.g. credit card data has been filled out). Looks like there's an internal didPresentAndContinue Bool on the FlowController. Maybe you could make this public? Or at least keep the paymentOption nil always on an explicit dismissal?
Code to reproduce
Present the PaymentSheet.FlowController
Fill out the e.g. card information (has to be valid and completely filled out)
Dismiss the sheet by pressing the dismiss button
Note that in the completion block the paymentOption is filled out with the data and there is no way to detect whether it was a dismissal
iOS version
17.2
Installation method
Cocoapods
SDK version
23.29.1
The text was updated successfully, but these errors were encountered:
Hi, thanks for filing this! The behavior of the cancel button is intentional: The FlowController sheet is is intended to modify the FlowController's payment information, so we don't discard any information provided by the user when they dismiss the sheet. We won't complete the payment until you call confirm() on the FlowController.
That said, we can look into providing an API to enable this! Can you share more about how you're using FlowController? Are you trying to confirm automatically after the sheet is dismissed?
Yes, I was trying to confirm automatically right after dismissal. I know this might be a workaround and not the intentional use of the FlowController but that was the only way I could control and make sure the sheet was dismissed and I could return to our own flow.
Long story short I ended up using the PaymentSheet instead but with another workaround in case of failed/cancelled 3ds (that's another story).
Sticking to the topic/issue here, I guess it makes sense not to discard the information but I think it would still make sense to be able to distinguish between a dismissal of the sheet or a "save/done" action. In case the user opens the FlowController sheet the first time, put's in some credit card information but dismisses the sheet, it wouldn't be expected that the payment information is saved (shown our own flow) no?
Summary
When calling
presentPaymentOptions(from:, completion:)
on the PaymentSheet.FlowController it seems to be impossible to detect whether the user actually pressed the CTA "Continue" button or the dismiss button. ThepaymentOption
seems to filled out with the payment data also in the case of an explicit dismissal (where all e.g. credit card data has been filled out). Looks like there's an internaldidPresentAndContinue
Bool on theFlowController
. Maybe you could make this public? Or at least keep thepaymentOption
nil always on an explicit dismissal?Code to reproduce
PaymentSheet.FlowController
paymentOption
is filled out with the data and there is no way to detect whether it was a dismissaliOS version
17.2
Installation method
Cocoapods
SDK version
23.29.1
The text was updated successfully, but these errors were encountered: