Default Changelist
This commit is contained in:
@@ -166,7 +166,7 @@ abstract class Subject extends Multiprogramming
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ abstract class Template extends Multiprogramming
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class Result
|
|||||||
public static function init(Client $client): static
|
public static function init(Client $client): static
|
||||||
{
|
{
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class Recharge extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
|
|||||||
+1
-1
@@ -339,7 +339,7 @@ class Redhat extends SmallProgram
|
|||||||
$client->post($this->searchUrl, $requestParam);
|
$client->post($this->searchUrl, $requestParam);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$json = json_decode($client->getBody(), true);
|
$json = json_decode($client->getBody(), true);
|
||||||
if (isset($json['result']) && $json['result'] != 'SUCCESS') {
|
if (isset($json['result']) && $json['result'] != 'SUCCESS') {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class SecCheck extends SmallProgram
|
|||||||
$client->upload($path, $data);
|
$client->upload($path, $data);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errCode']) && $body['errCode'] != 0) {
|
if (isset($body['errCode']) && $body['errCode'] != 0) {
|
||||||
@@ -68,7 +68,7 @@ class SecCheck extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errCode']) && $body['errCode'] != 0) {
|
if (isset($body['errCode']) && $body['errCode'] != 0) {
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class Token extends SmallProgram
|
|||||||
$client->get('/api/getToken', $query);
|
$client->get('/api/getToken', $query);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Cash_Bonus extends SmallProgram
|
|||||||
$client->post($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
$client->post($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$json = json_decode($client->getBody(), true);
|
$json = json_decode($client->getBody(), true);
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class Enterprise_payment extends SmallProgram
|
|||||||
$client->post($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
$client->post($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$json = json_decode($client->getBody(), true);
|
$json = json_decode($client->getBody(), true);
|
||||||
if (isset($json['return_code']) && $json['return_code'] != 'SUCCESS') {
|
if (isset($json['return_code']) && $json['return_code'] != 'SUCCESS') {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Account extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
@@ -63,7 +63,7 @@ class Account extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
@@ -115,7 +115,7 @@ class Account extends SmallProgram
|
|||||||
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (!is_null($body)) {
|
if (!is_null($body)) {
|
||||||
@@ -151,7 +151,7 @@ class Account extends SmallProgram
|
|||||||
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (!is_null($body)) {
|
if (!is_null($body)) {
|
||||||
@@ -187,7 +187,7 @@ class Account extends SmallProgram
|
|||||||
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
$client->post($url . $this->getConfig()->getAccessToken(), $sendBody);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (!is_null($body)) {
|
if (!is_null($body)) {
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ class Message extends SmallProgram
|
|||||||
$this->msgData = [];
|
$this->msgData = [];
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
@@ -303,7 +303,7 @@ class Message extends SmallProgram
|
|||||||
$this->msgData = [];
|
$this->msgData = [];
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class PublicTemplate extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class SecCheck extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
@@ -70,7 +70,7 @@ class SecCheck extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
@@ -108,7 +108,7 @@ class SecCheck extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class Token extends SmallProgram
|
|||||||
$client->get('cgi-bin/token', $query);
|
$client->get('cgi-bin/token', $query);
|
||||||
$client->close();
|
$client->close();
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$body = json_decode($client->getBody(), true);
|
$body = json_decode($client->getBody(), true);
|
||||||
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
if (isset($body['errcode']) && $body['errcode'] != 0) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class WxV2AppPayment extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class WxV2PayJsApi extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
||||||
@@ -87,7 +87,7 @@ class WxV2PayJsApi extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
||||||
@@ -133,7 +133,7 @@ class WxV2PayJsApi extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
||||||
@@ -179,7 +179,7 @@ class WxV2PayJsApi extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
if (isset($data['return_code']) && $data['return_code'] != 'SUCCESS') {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class WxV2Withdrawal extends SmallProgram
|
|||||||
$client->close();
|
$client->close();
|
||||||
|
|
||||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||||
return new Result(code: 505, message: 'network error.');
|
return new Result(code: 505, message: $client->getBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = Help::toArray($client->getBody());
|
$data = Help::toArray($client->getBody());
|
||||||
|
|||||||
Reference in New Issue
Block a user