Question

I am trying to develop wordpress woo-commerce payment gateway. After I complete transaction, here is my code.

`$order->update_status('on-hold',__('verifying transaction', 'woocommerce'));`

after the event is done, an json object gets displayed in the page

`{"result":"failure","messages":"","refresh":"false","reload":"false"}`

I try to set the result as 'success' but that failure result kept returning. could anyone give me suggestion where I have to look at?

here is the whole code,

$order->update_status('on-hold',__('verifying transaction', 'woocommerce')); return array('result' => 'success', 'redirect' => add_query_arg('order',$order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id')))) );

No correct solution

OTHER TIPS

You may need to set page/page id for woocommerce_pay_page_id by using add_option('woocommerce_pay_page_id', $page_id) any where in your custom plugin.

Hope will sort out your issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top