eee
This commit is contained in:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user