eee
This commit is contained in:
+6
-6
@@ -309,10 +309,10 @@ class Redhat extends SmallProgram
|
||||
}
|
||||
$client->post($this->sendUrl, http_build_query($this->generate()));
|
||||
$client->close();
|
||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->getBody());
|
||||
if (!in_array($client->statusCode, [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->body);
|
||||
}
|
||||
$json = json_decode($client->getBody(), true);
|
||||
$json = json_decode($client->body, true);
|
||||
if (isset($json['return_code']) && $json['return_code'] != 'SUCCESS') {
|
||||
return new Result(code: 500, message: $json['return_msg'] ?? $json['retmsg']);
|
||||
}
|
||||
@@ -347,10 +347,10 @@ class Redhat extends SmallProgram
|
||||
$client->withHeader(['Content-Type' => 'application/json']);
|
||||
$client->post($this->searchUrl, $requestParam);
|
||||
$client->close();
|
||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->getBody());
|
||||
if (!in_array($client->statusCode, [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->body);
|
||||
}
|
||||
$json = json_decode($client->getBody(), true);
|
||||
$json = json_decode($client->body, true);
|
||||
if (isset($json['result']) && $json['result'] != 'SUCCESS') {
|
||||
return new Result(code: 500, message: $response['res_info'] ?? '订单查询失败!');
|
||||
} else {
|
||||
|
||||
@@ -84,10 +84,10 @@ class Cash_Bonus extends SmallProgram
|
||||
public function mch_send(string $mch_billno, string $openId, float $price): Result
|
||||
{
|
||||
$client = $this->createClient($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->getBody());
|
||||
if (!in_array($client->statusCode, [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->body);
|
||||
}
|
||||
$json = json_decode($client->getBody(), true);
|
||||
$json = json_decode($client->body, true);
|
||||
|
||||
if (isset($json['return_code']) && $json['return_code'] != 'SUCCESS') {
|
||||
return new Result(code: 500, message: $json['return_msg'] ?? $json['retmsg']);
|
||||
|
||||
@@ -70,10 +70,10 @@ class Enterprise_payment extends SmallProgram
|
||||
public function mch_send(string $mch_billno, string $openId, float $price): Result
|
||||
{
|
||||
$client = $this->createClient($this->_cash, $this->orderConfig($mch_billno, $openId, $price));
|
||||
if (!in_array($client->getStatusCode(), [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->getBody());
|
||||
if (!in_array($client->statusCode, [101, 200, 201])) {
|
||||
return new Result(code: 505, message: $client->body);
|
||||
}
|
||||
$json = json_decode($client->getBody(), true);
|
||||
$json = json_decode($client->body, true);
|
||||
if (isset($json['return_code']) && $json['return_code'] != 'SUCCESS') {
|
||||
return new Result(code: 500, data: $json['return_msg'] ?? $json['retmsg']);
|
||||
} else if ($json['result_code'] != 'SUCCESS') {
|
||||
|
||||
Reference in New Issue
Block a user