From b8d53b564431f10d1aa1476221ba362831c283e1 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Wed, 22 Feb 2023 15:49:42 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9pc=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php index 38985fec6..7d6288904 100644 --- a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php +++ b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php @@ -198,7 +198,9 @@ class AllinPay extends Client $this->api = self::UNITODER_PAY_API; $this->payType = $isWechat ? 'W01' : 'A01'; $this->version = self::VERSION_NUM_11; - return $this->create($trxamt, $orderId, $body, null, null, null, '', $remark); + $res = $this->create($trxamt, $orderId, $body, null, null, null, '', $remark); + $invalid = time() + 60; + return ['invalid' => $invalid, 'logo' => sys_config('wap_login_logo'), 'code_url' => $res['payinfo']]; } /** From aa5bef98f48583c8b1c9872def8de4d8d78a827f Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Wed, 22 Feb 2023 15:57:14 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9pc=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/pay/OrderPayServices.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crmeb/app/services/pay/OrderPayServices.php b/crmeb/app/services/pay/OrderPayServices.php index 9375255ea..c42ed829a 100644 --- a/crmeb/app/services/pay/OrderPayServices.php +++ b/crmeb/app/services/pay/OrderPayServices.php @@ -106,6 +106,8 @@ class OrderPayServices */ public function beforePay(array $orderInfo, string $payType, array $options = []) { + $wehcat = $payType == PayServices::WEIXIN_PAY; + $payType = $this->getPayType($payType); if ($orderInfo['paid']) { @@ -133,6 +135,11 @@ class OrderPayServices } $options['openid'] = $openid; break; + case PayServices::ALLIN_PAY: + if ($wehcat) { + $options['wechat'] = $wehcat; + } + break; } From db585cf1639a722bb916290438471c28bae32c2a Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Wed, 22 Feb 2023 16:00:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=9D=E9=80=9A=E8=81=94=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php index 7d6288904..2a4af0840 100644 --- a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php +++ b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php @@ -200,7 +200,12 @@ class AllinPay extends Client $this->version = self::VERSION_NUM_11; $res = $this->create($trxamt, $orderId, $body, null, null, null, '', $remark); $invalid = time() + 60; - return ['invalid' => $invalid, 'logo' => sys_config('wap_login_logo'), 'code_url' => $res['payinfo']]; + if ($isWechat) { + $key = 'code_url'; + } else { + $key = 'qrCode'; + } + return ['invalid' => $invalid, 'logo' => sys_config('wap_login_logo'), $key => $res['payinfo']]; } /**