From f25696f22b5b69553b7762030c9be3535c4ddb90 Mon Sep 17 00:00:00 2001 From: Linux Date: Sun, 20 Oct 2024 12:37:16 +0800 Subject: [PATCH] Payment: add type configuration to Epay payment --- app/Payments/EPay.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Payments/EPay.php b/app/Payments/EPay.php index cf60128..2835c3f 100644 --- a/app/Payments/EPay.php +++ b/app/Payments/EPay.php @@ -27,7 +27,12 @@ class EPay 'label' => 'KEY', 'description' => '', 'type' => 'input', - ] + ], + 'type' => [ + 'label' => 'TYPE', + 'description' => 'alipay / qqpay / wxpay', + 'type' => 'input', + ], ]; } @@ -41,6 +46,9 @@ class EPay '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'];