Issue with failed payments
-
Upon testing failed payments, it still goes to the checkout/order-received page, but instead of order successful it correctly states:
“Unfortunately your order cannot be processed as the originating bank/merchant has declined your transaction. Please attempt your purchase again.”
The issue os that, upon getting a failed payment, there a “Pay” button is generated, to supposedly allow the customer to try to Pay again. But upon clicking it, it generates a website critical error, which I’ve already diagnosed stems from trying to Pay for an order, when the cart is empty (which happens because Woocommerce thinks the payment went through, as it goes to the checkout/order-received/ . So the solution has to be to somehow direct to a different page upon failed payment, or not allow it to empty the cart in this scenario, or add a different button that goes back to product page or other page to be determined (not necessarily the shop page).
Foe now, I am hiding the button via a display: none command for a.button.pay.pl-button as, at least on our site, it isn’t used anywhere else. This avoids the error, but then the customer has to manually go back to the shop or product page.
- The topic ‘Issue with failed payments’ is closed to new replies.