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

[BUG]: Payment dialog for swish redirecting on cancel #602

Closed
simonbengtsson opened this issue Apr 26, 2024 · 1 comment
Closed

[BUG]: Payment dialog for swish redirecting on cancel #602

simonbengtsson opened this issue Apr 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@simonbengtsson
Copy link

What happened?

When cancelling a Swish payment with the dismiss button highlighted in the screenshot the stripe.confirmPayment() method never returns and instead the user is redirected to the specified return_url. What I expect is that the user remains on the same page and a "cancellation error" is returned similar to what happens when dismissing a Google Pay dialog etc.

Screenshot 2024-04-26 at 16 20 41

Environment

No response

Reproduction

No response

@simonbengtsson simonbengtsson added the bug Something isn't working label Apr 26, 2024
@brendanm-stripe
Copy link
Contributor

Yes, by default this will redirect and you can check the payment status using the query parameters supplied.

If you want to avoid this, you can use redirect: 'if_required' in the confirmPayment options and inspect the payment intent in the result instead: https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants