This commit is contained in:
xl
2023-11-13 21:20:10 +08:00
parent 90c65a8c5f
commit 0d1cb506aa
10 changed files with 266 additions and 61 deletions
+1 -10
View File
@@ -29,16 +29,7 @@ class WxV3AppPayment extends SmallProgram
$sign = $this->signature('POST', '/v3/pay/transactions/components', $json = json_encode($body, JSON_UNESCAPED_UNICODE));
$client = new Client('api.mch.weixin.qq.com', 443, TRUE);
$client->withAddedHeader('Authorization', $sign)->withContentType('application/json')
->withAgent('application/json')->withBody($json)->withAddedHeader("Accept", "*/*");
$proxyHost = $this->getConfig()->getProxyHost();
$proxyPort = $this->getConfig()->getProxyPort();
if (!empty($proxyHost) && $proxyPort > 0) {
$client->withProxyHost($proxyHost)->withProxyPort($proxyPort);
}
$client = $this->createClient($sign, $json);
$client->post('/v3/pay/transactions/components');
$client->close();