Skip to content

Commit

Permalink
fix: 修正微信V3提现接口参数处理
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Aug 5, 2024
1 parent 8c84c05 commit e750ac9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions WePayV3/Transfers.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public function batchs($body)
foreach ($body['transfer_detail_list'] as &$item) if (isset($item['user_name'])) {
$item['user_name'] = $this->rsaEncode($item['user_name']);
}
}
if (empty($body['total_num'])) {
$body['total_num'] = count($body['transfer_detail_list']);
}
if (empty($body['total_amount'])) {
$body['total_amount'] = array_sum(array_column($body['transfer_detail_list'], 'transfer_amount'));
if (empty($body['total_num'])) {
$body['total_num'] = count($body['transfer_detail_list']);
}
if (empty($body['total_amount'])) {
$body['total_amount'] = array_sum(array_column($body['transfer_detail_list'], 'transfer_amount'));
}
}
return $this->doRequest('POST', '/v3/transfer/batches', json_encode($body, JSON_UNESCAPED_UNICODE), true);
}
Expand Down

0 comments on commit e750ac9

Please sign in to comment.