From 59ca0950728713120ac447c764cbb2938ab9ccc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 21 Apr 2025 23:06:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=8F=90=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WePayV3/Transfers.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/WePayV3/Transfers.php b/WePayV3/Transfers.php index 8137197..92c4575 100644 --- a/WePayV3/Transfers.php +++ b/WePayV3/Transfers.php @@ -25,6 +25,25 @@ use WePayV3\Contracts\BasicWePay; */ class Transfers extends BasicWePay { + + /** + * 新版商家转换到零钱 + * @param $body + * @return array|string + * @throws \WeChat\Exceptions\InvalidResponseException + * @link https://pay.weixin.qq.com/doc/v3/merchant/4012716434 + */ + public function bills($body) + { + if (empty($body['appid'])) { + $body['appid'] = $this->config['appid']; + } + if (!empty($body['user_name'])) { + $body['user_name'] = $this->rsaEncode($body['user_name']); + } + return $this->doRequest('POST', '/v3/fund-app/mch-transfer/transfer-bills', json_encode($body, JSON_UNESCAPED_UNICODE), true); + } + /** * 发起商家批量转账 * @param array $body