From 1768f700bbc69c6d7f96e02f1241570be8350afe Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Fri, 23 Jun 2023 11:08:17 -0500 Subject: [PATCH] Update ZGo API call to new security parameters --- zgopmtgwy.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zgopmtgwy.php b/zgopmtgwy.php index 4a70020..1d2a39f 100644 --- a/zgopmtgwy.php +++ b/zgopmtgwy.php @@ -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: