From a876b780f58ee450a5adcd30a0fd50a205bbceda Mon Sep 17 00:00:00 2001 From: xl Date: Tue, 7 Nov 2023 15:17:59 +0800 Subject: [PATCH] Default Changelist --- wchat/wx/V3/TransferBatches.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wchat/wx/V3/TransferBatches.php b/wchat/wx/V3/TransferBatches.php index 54435f0..267dcd0 100644 --- a/wchat/wx/V3/TransferBatches.php +++ b/wchat/wx/V3/TransferBatches.php @@ -20,13 +20,14 @@ class TransferBatches extends SmallProgram #[ArrayShape(['code_url' => "string"])] public function request(TransferDetail $detail): array { + $body = []; $body['appid'] = $this->getConfig()->getAppid(); $body['out_trade_no'] = $detail->out_detail_no; $body["batch_name"] = $this->getConfig()->getBody(); $body["batch_remark"] = $this->getConfig()->getBody(); $body["total_amount"] = $detail->transfer_amount; $body["total_num"] = 1; - $body["transfer_detail_list"] = $detail->toArray(); + $body["transfer_detail_list"] = [$detail->toArray()]; $sign = $this->signature('POST', '/v3/transfer/batches', $json = json_encode($body, JSON_UNESCAPED_UNICODE)); @@ -39,7 +40,7 @@ class TransferBatches extends SmallProgram if (!empty($proxyHost) && $proxyPort > 0) { $client->withProxyHost($proxyHost)->withProxyPort($proxyPort); } - + $client->post('/v3/transfer/batches'); $client->close();