diff --git a/crmeb/app/services/pay/OrderPayServices.php b/crmeb/app/services/pay/OrderPayServices.php index a34747be9..7a02c93fe 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; } diff --git a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php index 38985fec6..2a4af0840 100644 --- a/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php +++ b/crmeb/crmeb/services/pay/extend/allinpay/AllinPay.php @@ -198,7 +198,14 @@ 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; + if ($isWechat) { + $key = 'code_url'; + } else { + $key = 'qrCode'; + } + return ['invalid' => $invalid, 'logo' => sys_config('wap_login_logo'), $key => $res['payinfo']]; } /**