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

Success URL Redirect Not Working SCA? #292

Open
beckbailey opened this issue Jun 6, 2022 · 7 comments
Open

Success URL Redirect Not Working SCA? #292

beckbailey opened this issue Jun 6, 2022 · 7 comments
Assignees

Comments

@beckbailey
Copy link

Description

My success URL redirect is not working. In the Stripe log, the success_url looks like this:

https://mydomain.com/enupal/stripe-payments/finish-order?session_id=cs_test_a10l2JKNKRFdFQfqnoC2u2XE2BogBBOqIvNAQvPa3gYuMfHVuVw1XYLaMg

However in the Craft admin, my checkout success url looks like this /thank-you?number={number}

I should state the cancel URL works fine and matches in the Stripe log and Craft Admin payment form setting field.

Steps to reproduce

  1. Have a checkout success URL set on your form.
  2. Complete a successful transaction in test mode or production mode.
  3. You are redirected to the homepage and not your checkout success URL.

Additional info

  • Craft version: 3.7.37
  • PHP version: 7.3.27
  • Database driver & version: MySQL 5.7.33
  • Plugin version: 4.0.3 Lite
  • Is SCA and Stripe Checkout enabled?: yes
@gazlawn22
Copy link

Also just hit this issue...

Forms doesn't seem to be respecting checkout Success URL set in admin or set in code via:

checkoutSuccessUrl: '/competitors/thank-you?number={number}',

However success url in Stripe we're seeing is:

"success_url": "https://burghley.nitro/enupal/stripe-payments/finish-order?session_id={CHECKOUT_SESSION_ID}",

Craft version: 3.7.37
PHP version: 7.3.27
Database driver & version: MySQL 8.0.26
Plugin version: 4.0.3 Lite

@andrelopez andrelopez self-assigned this Jun 9, 2022
@andrelopez
Copy link
Member

Could you please confirm if the order was created under Stripe Payments -> Orders?

@gazlawn22
Copy link

gazlawn22 commented Jun 9, 2022 via email

@beckbailey
Copy link
Author

beckbailey commented Jun 9, 2022 via email

@andrelopez
Copy link
Member

andrelopez commented Jun 26, 2022

The https://yoursite.com/enupal/stripe-payments/finish-order URL is always called from Stripe, this endpoint helps to finish the order on Craft CMS, and then once the order is created, Stripe Payments redirect to the checkoutSuccessUrl URL.

@beckbailey Your issue sounds like a wrong webhook URL setup on Stripe. If you're working locally, are you using the Stripe CLI?

@gazlawn22 After the order is finished, does the user is redirected to the 'checkoutSuccessUrl` ?

@beckbailey
Copy link
Author

@andrelopez - No I'm not using the Stripe CLI. This is happening in my local and production environments.

@simonleadbetter
Copy link

Our client has reported a very similar issue. Intermittently, users are redirected to the Cancel URL not the Success URL, which is a problem in this case as they can not complete the form they are paying access to.

This doesn’t happen for every order and we noticed an anomaly with the most recent record our client informed us about in that the user was recorded as Guest. This is weird as login is required before the user can gain access to this section. All other orders has a correctly assigned user.

SCA is enabled for this website. We are running Stripe Payments 3.4.2. Craft Pro 3.7.37.

We are about to deploy an update to Stripe Payments 4.0.6 as part of wider system updates, but this has not be actioned as yet. We will also be bumping Craft to 3.7.48. Just mentioning this in case it is session related.

Anyway, I thought I would share this information in case it helps uncover what may be causing this issue. We are still actively monitoring the website, so if we have another reoccurrence or uncover anything we will share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants