• Resolved luispf39

    (@luispf39)


    Good morning,

    Since February, when we updated WooCommerce Stripe Gateway plugin (then we have uptated it again, but problem is still there), when some clients made their payment, they returned to /shop page insted confirmation page. So it is not happening always, only in some cases. We can’t replicate this on Stripe test mode, only when system is working in Real mode.

    I’ve seen URLs when return to /shop page had the “&wc-stripe-confirmation=1” parameter. Could be this a problem?

    For example:

    /pago/pay-for-order/2428/?pay_for_order=true&key=wc_order_fu55taPgFv7fp&wc-stripe-confirmation=1

    Any idea how to fix this problem?

    Thank you so much,
    Luis

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @luispf39,

    For reference, the free Stripe plugin itself does not contain any functionality related to return URLs. By default, WooCommerce would always return the customer to the Order Received page after a successful payment using almost any payment gateway.

    I’ve performed some cross-testing for us today on several of my sites which have the latest versions of WordPress, WooCommerce and our free Storefront theme as the only enabled software. When doing so I’ve not been able to replicate the behaviour which you describe with all customers being returned to the correct Order Received page on my test installations.

    From what you have described, it could be code from another plugin or theme which has caused a possible conflict and affected the functionality of WooCommerce + Stripe.

    To see if that is the case we’d suggest carrying out a conflict test on your site by disabling all other plugins aside from WooCommerce along with switching to a theme like Storefront. This will help with trying to and locate what software you have installed which could possibly be causing this behaviour? You could use a free plugin called Health Check and Troubleshooting to carry out such testing.

    When in Troubleshooting mode all plugins will be deactivated and only the admin of the site carrying out the troubleshooting would see those changes. Any customers visiting the site would see no changes at all.

    Once you have disabled all other plugins and switched themes if the behaviour is resolved you can then enabled your theme and sites plugins testing after each one is enabled until the behaviour returns to locate the culprit.

    https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    As this behaviour on your site seems sporadic from what you’ve described it might be worth setting up a staging site to test the payments on until you can consistently replicate the behaviour.

    Thread Starter luispf39

    (@luispf39)

    Hi @stuartduff,

    I tried it some days ago, but problem was still there with no plugins enabled. I think it is Stripe plugin, becauase it redirects to /shop page ONLY when verification is required by customer’s card issuer, so ONLY on this cases, our shop redirects to /shop after verification. If card issuer doesn’t ask for a SMS or APP verification, everything works as expected.

    As I told you before, every time customer goes to /shop after paying, the URL contains this parameter: &wc-stripe-confirmation=1

    Is it this parameter from your plugin?

    Thank you,
    Luis

    Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    Is it this parameter from your plugin?

    I think so: https://github.com/woocommerce/woocommerce-gateway-stripe/blob/349fea596aaba31baa502bd70cca136d681bb432/includes/compat/class-wc-stripe-email-failed-authentication.php#L71 – I am no expert for the codebase of WooCommerce Stripe but the function description sounds like it is one of the basic arguments to verify the session.

    So it is not happening always, only in some cases.

    It seems to me that it only is used when the order-pay endpoint is triggered: https://github.com/woocommerce/woocommerce-gateway-stripe/blob/f4b456773b1ae1bd6f778e74ab8c3b7a2d366c32/includes/class-wc-gateway-stripe.php#L816

    Does that fit to your scenario?

    Kind regards,

    Thread Starter luispf39

    (@luispf39)

    Hi @conschneider,

    Yes, I think so, but is there any way to fix this bug?

    I’m considering to downgrade the plugin to October / November ’20 version, because before the thank you page redirection was working fine, but I would prefer to mantain the current version of course if we can fix it.

    Should this endopoint works with pay-for-order page, instead order-pay? I think we are using custom orders, so we use pay-for-order page.

    Thank you!

    Plugin Support Saravanan S, a11n

    (@simplysaru)

    Hi @luispf39,

    >I think so, but is there any way to fix this bug?

    We aren’t really sure as we haven’t been able to replicate this issue on our end.

    >Should this endpoint works with pay-for-order page, instead order-pay? I think we are using custom orders, so we use pay-for-order page.

    I would suggest you raise this as an issue in the Stripe plugin repo so that the developers take a look at this and work on this further.

    Thread Starter luispf39

    (@luispf39)

    Hi @simplysaru,

    I have opened an issue on Github. Thank you so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirect to /shop after pay’ is closed to new replies.