Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
吴昊天 2023-02-22 17:52:05 +08:00
commit 010170182d
2 changed files with 15 additions and 1 deletions

View File

@ -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;
}

View File

@ -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']];
}
/**