Default Changelist
This commit is contained in:
@@ -13,29 +13,20 @@ class TransferBatches extends SmallProgram
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $orderNo
|
* @param TransferDetail $detail
|
||||||
* @param int $total
|
|
||||||
* @param string $openId
|
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
#[ArrayShape(['code_url' => "string"])]
|
#[ArrayShape(['code_url' => "string"])]
|
||||||
public function request(string $orderNo, int $total, string $openId): array
|
public function request(TransferDetail $detail): array
|
||||||
{
|
{
|
||||||
$body['appid'] = $this->getConfig()->getAppid();
|
$body['appid'] = $this->getConfig()->getAppid();
|
||||||
$body['out_trade_no'] = $orderNo;
|
$body['out_trade_no'] = $detail->out_detail_no;
|
||||||
$body["batch_name"] = $this->getConfig()->getBody();
|
$body["batch_name"] = $this->getConfig()->getBody();
|
||||||
$body["batch_remark"] = $this->getConfig()->getBody();
|
$body["batch_remark"] = $this->getConfig()->getBody();
|
||||||
$body["total_amount"] = $total;
|
$body["total_amount"] = $detail->transfer_amount;
|
||||||
$body["total_num"] = 1;
|
$body["total_num"] = 1;
|
||||||
$body["transfer_detail_list"] = [
|
$body["transfer_detail_list"] = $detail->toArray();
|
||||||
[
|
|
||||||
"out_detail_no" => $orderNo,
|
|
||||||
"transfer_amount" => $total,
|
|
||||||
"transfer_remark" => $this->getConfig()->getBody(),
|
|
||||||
"openid" => $openId,
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
$sign = $this->signature('POST', '/v3/transfer/batches', $json = json_encode($body, JSON_UNESCAPED_UNICODE));
|
$sign = $this->signature('POST', '/v3/transfer/batches', $json = json_encode($body, JSON_UNESCAPED_UNICODE));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user