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 -12
View File
@@ -5,7 +5,6 @@ namespace wchat\wx\V3;
use Exception;
use JetBrains\PhpStorm\ArrayShape;
use Kiri\Client;
use Kiri\Message\Stream;
use wchat\wx\SmallProgram;
class WxV3Withdrawal extends SmallProgram
@@ -29,17 +28,7 @@ class WxV3Withdrawal extends SmallProgram
$sign = $this->signature('POST', '/v3/pay/transactions/batches', $json = json_encode($body, JSON_UNESCAPED_UNICODE));
$client = new Client('api.mch.weixin.qq.com', 443, TRUE);
$client->withAddedHeader('Authorization', $sign)
->withContentType('application/json')->withAddedHeader('User-Agent', '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/batches');
$client->close();