Skip to content

Commit

Permalink
paymentMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Oct 12, 2024
1 parent bb34318 commit 15a7e89
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getData()
'PaymentType' => $this->getPaymentType(),
'TotalAmount' => (int) $amount,
'TradeDesc' => UrlService::ecpayUrlEncode($this->getDescription()),
'ChoosePayment' => $this->getChoosePayment(),
'ChoosePayment' => $this->getChoosePayment() ?: 'ALL',
'Remark' => $this->getRemark(),
'ChooseSubPayment' => $this->getChooseSubPayment(),
'NeedExtraPaidInfo' => $this->getNeedExtraPaidInfo(),
Expand Down
8 changes: 5 additions & 3 deletions src/Traits/HasSendFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public function getTradeDesc()

/**
* 選擇預設 付款方式
* 綠界提供下列付款方式,請於建立訂單 時傳送過來: Credit:信用卡及銀聯卡(需申請開通) WebATM:網路 ATM
* 綠界提供下列付款方式,請於建立訂單 時傳送過來:
* Credit:信用卡及銀聯卡(需申請開通)
* WebATM:網路 ATM
* ATM:自動櫃員機
* CVS:超商代碼
* BARCODE:超商條碼 ALL:不指定付款方式,由綠界顯示付款 方式選擇頁面。
Expand All @@ -80,15 +82,15 @@ public function getTradeDesc()
*/
public function setChoosePayment($value)
{
return $this->setParameter('ChoosePayment', $value);
return $this->setPaymentMethod($value);
}

/**
* @return string
*/
public function getChoosePayment()
{
return $this->getParameter('ChoosePayment') ?: 'ALL';
return $this->getPaymentMethod();
}

/**
Expand Down

0 comments on commit 15a7e89

Please sign in to comment.