Skip to content

Commit

Permalink
Payment: add type configuration to Epay payment
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux committed Oct 20, 2024
1 parent 4d4adc4 commit f25696f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/Payments/EPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public function form()
'label' => 'KEY',
'description' => '',
'type' => 'input',
]
],
'type' => [
'label' => 'TYPE',
'description' => 'alipay / qqpay / wxpay',
'type' => 'input',
],
];
}

Expand All @@ -41,6 +46,9 @@ public function pay($order)
'out_trade_no' => $order['trade_no'],
'pid' => $this->config['pid']
];
if(optional($this->config)['type']){
$params['type'] = $this->config['type'];
}
ksort($params);
reset($params);
$str = stripslashes(urldecode(http_build_query($params))) . $this->config['key'];
Expand Down

0 comments on commit f25696f

Please sign in to comment.