-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Not possible to distinguish between dismiss and continue on the PaymentSheet.FlowController #3965
Comments
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 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? |
Thanks for the reply! 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. 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? |
Same issue here. After switching to the newer PaymentSheet I realize that step "(1) Add a Card" is only possible with FlowController. Now, having no ability to determine between "Continue" and "Cancel" I should either suffer this issue or redesign the custom payment dialog (which would take several days, including major redesign of our payment UX, while spending resources for this was not in our plans). Alternatively, I have found there is a |
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: