eee
This commit is contained in:
@@ -32,7 +32,7 @@ class WxV3AppPayment extends SmallProgram
|
||||
$client->post('/v3/pay/transactions/components');
|
||||
$client->close();
|
||||
|
||||
$json = json_decode($client->getBody(), TRUE);
|
||||
$json = json_decode($client->body, TRUE);
|
||||
if (!isset($json['prepay_id'])) {
|
||||
throw new Exception('微信支付调用失败');
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class WxV3NativePayment extends SmallProgram
|
||||
$client->post('/v3/pay/transactions/native');
|
||||
$client->close();
|
||||
|
||||
$json = json_decode($client->getBody(), TRUE);
|
||||
$json = json_decode($client->body, TRUE);
|
||||
if (!isset($json['code_url'])) {
|
||||
throw new Exception('微信支付调用失败');
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ class WxV3Payment extends SmallProgram
|
||||
$client->post('/v3/pay/transactions/jsapi');
|
||||
$client->close();
|
||||
|
||||
$json = json_decode($client->getBody(), TRUE);
|
||||
$json = json_decode($client->body, TRUE);
|
||||
if (!isset($json['prepay_id'])) {
|
||||
throw new Exception('微信支付调用失败: ' . $client->getBody());
|
||||
throw new Exception('微信支付调用失败: ' . $client->body);
|
||||
}
|
||||
|
||||
return $this->createResponse($json, $body);
|
||||
|
||||
@@ -102,7 +102,7 @@ trait WxV3PaymentTait
|
||||
$client->get($parseUrl, ['mchid' => $config->pay->wx->mchId]);
|
||||
$client->close();
|
||||
|
||||
return json_decode($client->getBody(), TRUE);
|
||||
return json_decode($client->body, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ class WxV3Transfer extends SmallProgram
|
||||
$client->post('/v3/fund-app/mch-transfer/transfer-bills');
|
||||
$client->close();
|
||||
|
||||
Kiri::getLogger()->println($client->getBody());
|
||||
Kiri::getLogger()->println($client->body);
|
||||
|
||||
if ($client->getStatusCode() == 200) {
|
||||
return json_decode($client->getBody(), TRUE);
|
||||
if ($client->statusCode == 200) {
|
||||
return json_decode($client->body, TRUE);
|
||||
}
|
||||
throw new Exception('转账申请发起失败');
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class WxV3Withdrawal extends SmallProgram
|
||||
$client->post('/v3/pay/transactions/batches');
|
||||
$client->close();
|
||||
|
||||
$json = json_decode($client->getBody(), TRUE);
|
||||
$json = json_decode($client->body, TRUE);
|
||||
if (!isset($json['prepay_id'])) {
|
||||
throw new Exception('微信支付调用失败');
|
||||
}
|
||||
@@ -88,10 +88,10 @@ class WxV3Withdrawal extends SmallProgram
|
||||
$client->post('/v3/fund-app/mch-transfer/transfer-bills');
|
||||
$client->close();
|
||||
|
||||
Kiri::getLogger()->println($client->getBody());
|
||||
Kiri::getLogger()->println($client->body);
|
||||
|
||||
if ($client->getStatusCode() == 200) {
|
||||
return json_decode($client->getBody(), TRUE);
|
||||
if ($client->statusCode == 200) {
|
||||
return json_decode($client->body, TRUE);
|
||||
}
|
||||
throw new Exception('转账申请发起失败');
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class WxVirtualPayment extends SmallProgram
|
||||
|
||||
$client = new Client('api.weixin.qq.com', 443, true);
|
||||
$client->post('/xpay/query_order?access_token=' . $this->payConfig->getAccessToken() . '&pay_sig=' . $this->paySign('/xpay/query_order', $data), $data);
|
||||
$resp = $client->getBody();
|
||||
$resp = $client->body;
|
||||
|
||||
$client->close();
|
||||
|
||||
@@ -94,7 +94,7 @@ class WxVirtualPayment extends SmallProgram
|
||||
|
||||
$client = new Client('api.weixin.qq.com', 443, true);
|
||||
$client->post('/xpay/notify_provide_goods?access_token=' . $this->payConfig->getAccessToken() . '&pay_sig=' . $this->paySign('/xpay/notify_provide_goods', $data), $data);
|
||||
$resp = $client->getBody();
|
||||
$resp = $client->body;
|
||||
$client->close();
|
||||
|
||||
return json_decode($resp, true);
|
||||
|
||||
Reference in New Issue
Block a user