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