• Resolved alpha2

    (@neoseeyou)


    Hello

    We run an online shop with stripe payment gateway and we have (maybe 5 per day) few duplicate orders with the status “pending payment”. The second order is mark as payment complete 2 minutes after this first “pending payment” order. Not the same ID.

    I search on forums and github and it doesn’t seem to be due to our server as we have a powerfull one and these orders are sometime made during the night. Cloudflare?

    What could explain this behaviour?

    Thank you for your hints

Viewing 13 replies - 1 through 13 (of 13 total)
  • AJ a11n

    (@amandasjackson)

    Hi @neoseeyou

    It’s certainly possible that Cloudfare could be causing the issue. Typically, double charges are linked to something else conflicting with the site as there is a method to stop this within the extension so out of the box this shouldn’t happen.

    This kind of problem is usually caused by either a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    Thread Starter alpha2

    (@neoseeyou)

    Hello Amanda,

    Thank you for your answer, however it will be difficult to change theme live website as you can imagine ??

    For you there is a good chance, that Cloudflare is playing a part in this process?

    I repeat it doesn’t double charge, it create a first order with no payment attach to it and 2 minutes after, a second valid order.

    On my side, i never be able to reproduced this type of duplicate order

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @neoseeyou

    The aggressive caching by Cloudflare has been known to cause issues. If you can replicate the problem on a staging site, my suggestion would be to test for conflicts using the steps above there to not impact live traffic.

    Thread Starter alpha2

    (@neoseeyou)

    Hello John, thank you for your answer, Cloudflare can be the troublemaker indeed ??

    Unfortunatly, i try to replicate it on stagging site (with same caching level on cloudflare) but i am not able to reproduce this behaviour.

    As i said, the customer create a valid order 1/2 minutes just after the one with “pending payment” status.

    We are lucky indeed that it ‘s not duplicated the payment.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @neoseeyou

    Thanks for the follow-up. Caching the checkout or minifying JS are typically to blame. If there is a way to minimize the aggressive caching or if omitting Cloudflare from the checkout process is possible, I’d suggest going that route.

    If you have Autoptimize, that has also known to cause trouble. Free free to post a solution with what you find.

    If Autoptimize: untick the “optimize cart & checkout” option to make sure the optimized JS cannot cause issues?

    Thread Starter alpha2

    (@neoseeyou)

    No we are using wp rocket (and in few weeks Flyingpress instead).

    The checkout page is already uncached with wp rocket, i must check if i can uncached thrue cloudflare this page.

    Thank you for this advice.

    Thread Starter alpha2

    (@neoseeyou)

    We upgrade all plugins on our store and still the issue is happening 2/3 times per day.

    We notice that it always happening when customer choose relay points as shipping option. It’s our only hint actually.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @neoseeyou.Great observation although I’m not sure what it means. However, the fact that you can’t replicate the issue on your staging site does point to a configuration issue. Is the server-side caching, for example, different on live sites versus caching sites? The key here is in finding out what’s different.

    It’s been a while since we were last in touch. Have you made any progress since?

    Thread Starter alpha2

    (@neoseeyou)

    Hello @drwpcom , thank you for your anwser, unfortunatly there are still issues with duplicate orders mark as “waiting for payment”. I tried so many solutions without any luck (disable cloudflare waf/cache/ etc…°

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @neoseeyou. Are all your extensions and WooCommerce itself up to date?

    In both cases, do the order notes show that payment was attempted with Stripe or was the payment never attempted at all? You can also double-check this by enabled debug logging in Stripe in WooCommerce > Settings > Stripe. This will generate a debug log in WooCommerce > Status > Logs that you can look through for clues as to what’s going on.

    Have you had a chance to compare the system reports of your staging and production sites? If you’d like to post them here (or post them in an online document and share the link), we can also look for clues of the differences.

    Thread Starter alpha2

    (@neoseeyou)

    Hello @drwpcom,

    To answer your question, the duplicate order don’t show any payment attempted at all.

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @neoseeyou. This is likely something related to Stripe rather than WooCommerce itself. If you’re using this Stripe extension, please contact us from your WooCommerce.com account at https://woocommerce.com/my-account/create-a-ticket/. You can reference this forum thread as well.

    If you’re using a different payment gateway, please contact the support for that extension directly for help.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Double orders pending payment status’ is closed to new replies.