From 9cc13c27260f81f9e3eff95f0a4b7facc72509f4 Mon Sep 17 00:00:00 2001 From: wuliangbo Date: Fri, 6 Mar 2020 17:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BD=AC=E8=B4=A6=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Payment/Fund/Client.php | 7 ++++--- .../Model/AlipayFundTransUniTransferContentBuilder.php | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Payment/Fund/Client.php b/src/Payment/Fund/Client.php index ba27ceb..05d5d24 100755 --- a/src/Payment/Fund/Client.php +++ b/src/Payment/Fund/Client.php @@ -24,6 +24,8 @@ class Client extends AppClient $contentBuilder->setOutBizNo($payload['out_biz_no']); $contentBuilder->setTransAmount($payload['trans_amount']); $contentBuilder->setIdentity($payload['identity']); + $productCode = $payload['product_code'] ?? 'TRANS_ACCOUNT_NO_PWD'; + $contentBuilder->setProductCode($productCode); if (isset($payload['identity_type'])) { $contentBuilder->setIdentity($payload['identity_type']); } @@ -33,9 +35,8 @@ class Client extends AppClient if (isset($payload['remark'])) { $contentBuilder->setRemark($payload['remark']); } - if (isset($payload['biz_scene'])) { - $contentBuilder->setBizScene($payload['biz_scene']); - } + $bizScene = $payload['biz_scene'] ?? 'DIRECT_TRANSFER'; + $contentBuilder->setBizScene($bizScene); if (isset($payload['order_title'])) { $contentBuilder->setOrderTitle($payload['order_title']); } diff --git a/src/Payment/Model/AlipayFundTransUniTransferContentBuilder.php b/src/Payment/Model/AlipayFundTransUniTransferContentBuilder.php index 3c90af8..616a881 100644 --- a/src/Payment/Model/AlipayFundTransUniTransferContentBuilder.php +++ b/src/Payment/Model/AlipayFundTransUniTransferContentBuilder.php @@ -161,4 +161,10 @@ class AlipayFundTransUniTransferContentBuilder extends BaseContentBuilder $this->businessParams = $businessParams; $this->bizContentarr['business_params'] = $businessParams; } + + public function setProductCode($productCode = 'TRANS_ACCOUNT_NO_PWD') + { + $this->productCode = $productCode; + $this->bizContentarr['product_code'] = $productCode; + } } \ No newline at end of file