Update ZGo API call to new security parameters

This commit is contained in:
Rene Vergara 2023-06-23 11:08:17 -05:00
parent 244a2cc80e
commit 1768f700bb
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -213,7 +213,7 @@ function zgopmt_init() {
$wc_order_key = $order->get_order_key();
$url = 'https://api.zgo.cash/woopayment' .
$url = 'https://test.zgo.cash/woopayment' .
'?ownerid=' . $this->zgoownerid .
'&token=' . $this->zgotoken .
'&order_id=' . $order_id .
@ -235,6 +235,7 @@ function zgopmt_init() {
$body = wp_remote_retrieve_body( $response );
$oid = json_decode($body);
$zgoOrderid = $oid->{'order'};
$zgoOrderToken = $oid->{'token'};
//
// Save ZGo Order ID and Cart order
//
@ -264,7 +265,7 @@ function zgopmt_init() {
return array(
'result' => 'success',
'redirect' => 'https://app.zgo.cash/invoice/' . $zgoOrderid,
'redirect' => 'https://dev.zgo.cash/invoice/' . $zgoOrderid . '?token=' . $zgoOrderToken,
);
break;
case 202: