Browse Source

pc 支付问题修复

吴昊天 2 years ago
parent
commit
95c54075f8

+ 2 - 2
crmeb/app/api/controller/v1/order/StoreOrderController.php

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

+ 0 - 5
crmeb/app/services/order/StoreOrderCreateServices.php

@@ -183,11 +183,6 @@ class StoreOrderCreateServices extends BaseServices
         if ($deduction) {
         if ($deduction) {
             $couponId = 0;
             $couponId = 0;
             $useIntegral = false;
             $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 门店自提
         //$shipping_type = 1 快递发货 $shipping_type = 2 门店自提
         $storeSelfMention = sys_config('store_self_mention') ?? 0;
         $storeSelfMention = sys_config('store_self_mention') ?? 0;

+ 2 - 4
crmeb/app/services/pay/OrderPayServices.php

@@ -176,19 +176,17 @@ class OrderPayServices
      * @param $order
      * @param $order
      * @param $jsConfig
      * @param $jsConfig
      * @param string $payType
      * @param string $payType
-     * @param array $options
      * @return array
      * @return array
      * @author 等风来
      * @author 等风来
      * @email 136327134@qq.com
      * @email 136327134@qq.com
      * @date 2023/2/15
      * @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']);
         $payKey = md5($order['order_id']);
         switch ($payType) {
         switch ($payType) {
             case PayServices::ALIAPY_PAY:
             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);
                 CacheService::set($payKey, ['order_id' => $order['order_id'], 'other_pay_type' => false], 300);
                 break;
                 break;
             case PayServices::ALLIN_PAY:
             case PayServices::ALLIN_PAY:

File diff suppressed because it is too large
+ 4 - 4
crmeb/public/install/crmeb.sql