Skip to content

Commit c102bfa

Browse files
committed
fix: 微信 V3 提现增加自动统计金额
1 parent d05f53e commit c102bfa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

WePayV3/Transfers.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public function batchs($body)
4646
if (empty($body['total_num'])) {
4747
$body['total_num'] = count($body['transfer_detail_list']);
4848
}
49+
if (empty($body['total_amount'])) {
50+
$body['total_amount'] = array_sum(array_column($body['transfer_detail_list'], 'transfer_amount'));
51+
}
4952
return $this->doRequest('POST', '/v3/transfer/batches', json_encode($body, JSON_UNESCAPED_UNICODE), true);
5053
}
5154

0 commit comments

Comments
 (0)