How to deal with payments being approved for cancelled orders?
-
Hi,
We’ve noticed an issue on our site recently, which was ultimately caused by the Hold Stock feature, but can also be reproduced if an admin manually cancels an order while the store is waiting for a user to authorise a payment.
1. User starts placing an order using a credit card that requires authorisation (SCA).
2. User receives a prompt to approve payment.
3. Before payment is approved, the order is cancelled for some reason (either manually, or automatically due to timeout from Hold Stock feature).
4. User approves the payment.
5. The payment succeeds, and the user is shown order confirmation page.
6. The order remains in the “Cancelled” status in WooCommerce admin. No information about the payment is added to the order.This is quite a rare scenario, but it has occurred for us while using the Hold Stock feature. The user didn’t approve the payment until after the order had timed out / got automatically cancelled. This lead to the user being shown an Order Confirmation screen, but the order in WooCommerce wasn’t updated at all following the “Unpaid order cancelled – time limit reached. Order status changed from Pending payment to Cancelled.” update.
I’ve reproduced this on an almost-vanilla WordPress site with storefront theme (using the latest version of WordPress, WooCommerce and WooCommerce Stripe Gateway).
Can you provide any advice in how we should be dealing with this? Currently the only way we know it’s happened is if a customer asks us about it, or when it’s noticed by our finance team.
Do we just need to consider this a limitation of using the “Hold Stock” WooCommerce feature in combination with accepting payments which require SCA?
I saw there’s recently been a ‘wc_stripe_allowed_payment_processing_statuses’ filter which could be used here. We could use this to allow the plugin to transition orders from the Cancelled status when a user authorises an SCA payment, but I’m not sure if this would have any unintended consequences.
Regards,
Anthony
- The topic ‘How to deal with payments being approved for cancelled orders?’ is closed to new replies.