Closed RashidJa closed 4 years ago
Yes, this is default WooCommerce behaviour.
The Vipps Recurring API does not have a "cancel_url" field like the eCommerce API does. I can however achieve this by using the woocommerce_thankyou
hook and either display some custom text or redirect the customer elsewhere based on the order status.
I'm not entirely sure why WooCommerce doesn't do this by itself when it realizes the payment has failed as the hook is fired as early as possible. In my opinion they should've had a hook for checking a payment's status on return instead of just the generic thankyou hook.
I'll look into putting some custom text on the thankyou page first. If that still looks confusing I think it might be worth it to make a custom page rather than redirect to checkout as that's more descriptive for the customer as to what's going on.
This will be added in version 1.2.0.
Before releasing this update I will have to do some more testing and complete a few more issues :)
If you cancel on the Vipps page after checkout, you get redirected to the order received page, which might be confusing for customers. It also triggers the woocommerce_thankyou hooks, and writes a message on the order that the initial payment (in case of digital subscription) is charged, when in fact it's not. Would it not be better to redirect back the checkout page if you cancel on the Vipps page?