Update ZGo API call to new security parameters
This commit is contained in:
parent
244a2cc80e
commit
1768f700bb
1 changed files with 3 additions and 2 deletions
|
@ -213,7 +213,7 @@ function zgopmt_init() {
|
||||||
$wc_order_key = $order->get_order_key();
|
$wc_order_key = $order->get_order_key();
|
||||||
|
|
||||||
|
|
||||||
$url = 'https://api.zgo.cash/woopayment' .
|
$url = 'https://test.zgo.cash/woopayment' .
|
||||||
'?ownerid=' . $this->zgoownerid .
|
'?ownerid=' . $this->zgoownerid .
|
||||||
'&token=' . $this->zgotoken .
|
'&token=' . $this->zgotoken .
|
||||||
'&order_id=' . $order_id .
|
'&order_id=' . $order_id .
|
||||||
|
@ -235,6 +235,7 @@ function zgopmt_init() {
|
||||||
$body = wp_remote_retrieve_body( $response );
|
$body = wp_remote_retrieve_body( $response );
|
||||||
$oid = json_decode($body);
|
$oid = json_decode($body);
|
||||||
$zgoOrderid = $oid->{'order'};
|
$zgoOrderid = $oid->{'order'};
|
||||||
|
$zgoOrderToken = $oid->{'token'};
|
||||||
//
|
//
|
||||||
// Save ZGo Order ID and Cart order
|
// Save ZGo Order ID and Cart order
|
||||||
//
|
//
|
||||||
|
@ -264,7 +265,7 @@ function zgopmt_init() {
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'result' => 'success',
|
'result' => 'success',
|
||||||
'redirect' => 'https://app.zgo.cash/invoice/' . $zgoOrderid,
|
'redirect' => 'https://dev.zgo.cash/invoice/' . $zgoOrderid . '?token=' . $zgoOrderToken,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case 202:
|
case 202:
|
||||||
|
|
Loading…
Reference in a new issue