Closed ChromeOrange closed 8 years ago
The above code should fix the issue for non-WorldPay gateways. But that <meta http-equiv='Refresh' ...
tag will mean WorldPay is not compatible with WooCommerce POS.
Are you sure that is the best way to achieve a gateway redirect? Couldn't you follow the standard redirect returned by gateway->process_payment()
like PayPal Standard?
Actually. scratch that comment about gateway->process_payment()
, I see you are using a redirect there.
But then you are echoing a <meta http-equiv='Refresh' ...
tag on woocommerce_payment_complete
. When using the WC REST API, this meta
tag is printed above the JSON response which causes the POS to barf.
I've been trying to come up with an alternative but no joy.
This is from the the WorldPay docs
If your system requires a full redirect to your own Webpage, you can include a META refresh (with a short delay) in the output of your payment response script (shopper response).
No problem. Thanks for looking into the issue. It's likely that some gateways won't translate from WooCommerce to a point of sale situation.
I will add some information to docs.wcpos.com to let users know that WooCommerce POS is not compatible with WorldPay.
One of your / our customers has reported that there is a conflict with the WooCommerce WorldPay gateway
He has been in contact with you and has reported the following
The code he was using in the woocommerce_payment_complete function was
Now he is using
which means the woocommerce_payment_complete function isn't doing anything unless the payment gateway is WorldPay but the store owner is still reporting there is an issue.
Since the modified function is doing nothing unless WorldPay is used to pay for the order I can't see why he would still be having the issue but I'm not able to test your plugin on my site.