Support » Plugin: WooCommerce Stripe Payment Gateway » Order status not updating after payment fails

  • Resolved dchesbro

    (@dchesbro)



    Hello,

    The issue I am experiencing is that orders where payment has failed do not update their order status properly. I am testing with WooCommerce version 3.3.1 and WooCommerce Stripe Gateway 4.0.5.

    In my testing I will begin the checkout process (it doesn’t seem to matter if I am already logged in or if I am checking out as a new user), enter valid billing details, and use a Stripe test card to generate a payment error (for example 4000000000000002 or 4000000000000069).

    The checkout page will correctly display an error message, and the WooCommerce order page will show a failed payment note from Stripe (“The card was declined.”), and I will receive a failed order email, but the order status will remain “Pending Payment”.

    I don’t have any plugins besides WooCommerce and Stripe gateway installed, I am using the default WordPress TwentySeventeen theme, I have Webhooks setup, and Stripe is showing Webhooks are being sent successfully.

    After checking logs I see the following error messages:

    02-16-2018 @ 19:12:27 – ====Start Log====
    sources/src_1BwEdBEQafauzX9qFD1pwDX4
    ====End Log====

    02-16-2018 @ 19:12:27 – ====Start Log====
    Info: Begin processing payment for order 15 for the amount of 10.00
    ====End Log====

    02-16-2018 @ 19:12:27 – ====Start Log====
    charges request: Array
    (
    [currency] => usd
    [amount] => 1000
    [description] => WordPress [Dev] – Order 15
    [capture] => true
    [expand[]] => balance_transaction
    [metadata] => Array
    (
    [customer_name] => J Doe
    [customer_email] => [email removed]
    [order_id] => 15
    )

    [source] => src_1BwEdBEQafauzX9qFD1pwDX4
    )

    ====End Log====

    02-16-2018 @ 19:12:28 – ====Start Log====
    Error: stdClass Object
    (
    [error] => stdClass Object
    (
    [message] => Your card was declined.
    [type] => card_error
    [code] => card_declined
    [decline_code] => generic_decline
    [charge] => ch_1BwEdEEQafauzX9qTheZ1FDR
    )

    )

    ====End Log====

    02-16-2018 @ 19:12:31 - ====Start Log====
    Could not find order via charge ID: ch_1BwEdEEQafauzX9qTheZ1FDR
    ====End Log====

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author royho

    (@royho)

    Hello,

    I was not able to replicate this. Following your steps, this is what I get http://cld.wthms.co/JrP7Ex

    Same for me, this seems to happen when the following option is unchecked: “Require 3D Secure when applicable”.

    Reported on Github.

    Hello Johan,

    Thanks for the suggestion — after I enabled the ‘Require 3D Secure when applicable’ option my orders started updating as shown in royho’s screenshot.

    I suppose the next step would be investigating why this option disrupts order status updates/webhook messages, but for the time being this has solved my issue. Thanks again for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Order status not updating after payment fails’ is closed to new replies.