Skip to content
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

dismiss the Paymentsheet #2666

Open
Mohsenkhodadadzadehthelist opened this issue Jun 16, 2023 · 3 comments
Open

dismiss the Paymentsheet #2666

Mohsenkhodadadzadehthelist opened this issue Jun 16, 2023 · 3 comments
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@Mohsenkhodadadzadehthelist

Is your feature request related to a problem? Please describe.

the payment page on our app has a limited time to pay ( eg 3 minutes) and if the user can't finalize his/her payment, he/she is automatically redirected to the previous page, but the payment sheet is still open and it's not a proper experience for our users, because the session is expired, and user pays for nothing

Describe the solution you'd like

an ability ( like a function) to dismiss the Payment-sheet programmatically

@porter-stripe
Copy link
Collaborator

Hi @Mohsenkhodadadzadehthelist we currently don't support this functionality but I will add this to our internal tracker and let you know if we have any updates.

@porter-stripe porter-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Jun 16, 2023
@porter-stripe
Copy link
Collaborator

@Mohsenkhodadadzadehthelist as a possible workaround you can dismiss manually if the user doesn't finish their payment in time. This should dismiss PaymentSheet along with any additional ViewController's it has presented.

paymentSheet.present(from: myPresentingViewController) { ... }

myPresentingViewController.dismiss(..)

@Mohsenkhodadadzadehthelist
Copy link
Author

@porter-stripe Unfortunately the PreserntViewContoller is the main view controller and a UIPageController calls the payment sheet, so I cannot dismiss the myPresentingViewController because it is still alive and the other pages are in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:improvement triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

2 participants