Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
ycs77 committed Jul 11, 2024
1 parent af547f0 commit 43fa21f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/NewebPayMPG.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function creditRemember(string $identifier, CreditRememberDemand $demand
*/
public function cvscom(CVSCOM $cvscom = null)
{
$cvscom = $cvscom ?? $this->config->get('newebpay.CVSCOM');
$cvscom = $cvscom ?? $this->config->get('newebpay.CVSCOM') ?? CVSCOM::NONE;

if ($cvscom !== CVSCOM::NONE) {
$this->tradeData['CVSCOM'] = $cvscom->value;
Expand Down
16 changes: 8 additions & 8 deletions src/Results/MPGEzPayResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ class MPGEzPayResult extends Result
* 跨境通路中英文名稱對照
*/
protected $channels = [
'ALIPAY' => '支付寶',
'WECHATPAY' => '微信支付',
'ACCLINK' => '約定連結帳戶',
'CREDIT' => '信用卡',
'CVS' => '超商代碼',
'P2GEACC' => '簡單付電子帳戶轉帳',
'VACC' => 'ATM 轉帳',
'WEBATM' => 'WebATM 轉帳',
'ALIPAY' => '支付寶',
'WECHATPAY' => '微信支付',
'ACCLINK' => '約定連結帳戶',
'CREDIT' => '信用卡',
'CVS' => '超商代碼',
'P2GEACC' => '簡單付電子帳戶轉帳',
'VACC' => 'ATM 轉帳',
'WEBATM' => 'WebATM 轉帳',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Results/MPGResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function isFail(): bool
*/
public function message(): string
{
return $this->data['TradeInfo']['Message'];
return $this->data['TradeInfo']['Message'] ?? '';
}

/**
Expand Down

0 comments on commit 43fa21f

Please sign in to comment.