pc 支付问题修复

This commit is contained in:
吴昊天 2023-02-20 15:06:12 +08:00
parent e38b75cd52
commit 95c54075f8
4 changed files with 8 additions and 15 deletions

View File

@ -399,8 +399,8 @@ class StoreOrderController
{
[$uni, $paytype, $from, $quitUrl, $type] = $request->postMore([
['uni', ''],
['paytype', 'weixin'],
['from', 'weixin'],
['paytype', ''],
['from', ''],
['quitUrl', ''],
['type', 0]
], true);

View File

@ -183,11 +183,6 @@ class StoreOrderCreateServices extends BaseServices
if ($deduction) {
$couponId = 0;
$useIntegral = false;
$systemPayType = PayServices::PAY_TYPE;
unset($systemPayType['offline']);
if ($payType != 'pc' && !array_key_exists($payType, $systemPayType)) {
throw new ApiException(410246);
}
}
//$shipping_type = 1 快递发货 $shipping_type = 2 门店自提
$storeSelfMention = sys_config('store_self_mention') ?? 0;

View File

@ -176,19 +176,17 @@ class OrderPayServices
* @param $order
* @param $jsConfig
* @param string $payType
* @param array $options
* @return array
* @author 等风来
* @email 136327134@qq.com
* @date 2023/2/15
*/
public function afterPay($order, $jsConfig, string $payType, array $options = [])
public function afterPay($order, $jsConfig, string $payType)
{
$payKey = md5($order['order_id']);
switch ($payType) {
case PayServices::ALIAPY_PAY:
$isCode = $options['isCode'] ?? '';
if ($isCode && !($jsConfig->invalid ?? false)) $jsConfig->invalid = time() + 60;
$jsConfig->invalid = time() + 60;
CacheService::set($payKey, ['order_id' => $order['order_id'], 'other_pay_type' => false], 300);
break;
case PayServices::ALLIN_PAY:

File diff suppressed because one or more lines are too long