瀏覽代碼

【程序目录】优化支付宝

吴昊天 1 年之前
父節點
當前提交
10cd361d00

+ 1 - 1
crmeb/app/adminapi/controller/v1/marketing/StoreBargain.php

@@ -183,7 +183,7 @@ class StoreBargain extends AuthController
     {
         /** @var StoreBargainUserHelpServices $bargainUserHelpService */
         $bargainUserHelpService = app()->make(StoreBargainUserHelpServices::class);
-        $list = $bargainUserHelpService->getHelpList($id);
+        $list = $bargainUserHelpService->getHelpList((int)$id);
         return app('json')->success(compact('list'));
     }
 

+ 2 - 2
crmeb/app/api/controller/v1/activity/StoreBargainController.php

@@ -118,7 +118,7 @@ class StoreBargainController
             ['bargainId', 0],
             ['bargainUserUid', 0]
         ], true);
-        return app('json')->success($this->services->setHelpBargain($request->uid(), $bargainId, $bargainUserUid));
+        return app('json')->success($this->services->setHelpBargain($request->uid(), (int)$bargainId, (int)$bargainUserUid));
     }
 
     /**
@@ -139,7 +139,7 @@ class StoreBargainController
         /** @var StoreBargainUserHelpServices $bargainUserHelp */
         $bargainUserHelp = app()->make(StoreBargainUserHelpServices::class);
         [$page, $limit] = $this->services->getPageValue();
-        $storeBargainUserHelp = $bargainUserHelp->getHelpList($bargainUserTableId, $page, $limit);
+        $storeBargainUserHelp = $bargainUserHelp->getHelpList((int)$bargainUserTableId, $page, $limit);
         return app('json')->success($storeBargainUserHelp);
     }
 

+ 1 - 1
crmeb/app/api/controller/v1/store/StoreProductController.php

@@ -55,7 +55,7 @@ class StoreProductController
             ['priceOrder', ''],
             ['salesOrder', ''],
             [['news', 'd'], 0, '', 'is_new'],
-            [['type', 0], 0],
+            [['type', 'd'], 0],
             ['ids', ''],
             [['selectId', 'd'], 0],
             [['productId', 'd'], 0],

+ 5 - 0
crmeb/app/services/pay/OrderPayServices.php

@@ -140,6 +140,11 @@ class OrderPayServices
                     $options['wechat'] = $wechat;
                 }
                 break;
+            case PayServices::ALIAPY_PAY:
+                if ($wechat) {
+                    $options['returnUrl'] = sys_config('site_url') . '/pages/goods/order_pay_status/index?order_id=' . $orderInfo['order_id'];
+                }
+                break;
         }
 
 

+ 3 - 3
crmeb/crmeb/services/AliPayService.php

@@ -123,11 +123,11 @@ class AliPayService
      * @param string $totalAmount 支付金额
      * @param string $passbackParams 备注
      * @param string $quitUrl 同步跳转地址
-     * @param string $siteUrl
+     * @param string $returnUrl
      * @param bool $isCode
      * @return AlipayTradeWapPayResponse
      */
-    public function create(string $title, string $orderId, string $totalAmount, string $passbackParams, string $quitUrl = '', string $siteUrl = '', bool $isCode = false)
+    public function create(string $title, string $orderId, string $totalAmount, string $passbackParams, string $quitUrl = '', string $returnUrl = '', bool $isCode = false)
     {
         $title = trim($title);
         try {
@@ -139,7 +139,7 @@ class AliPayService
                 $result = Factory::payment()->app()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount);
             } else {
                 //h5支付
-                $result = Factory::payment()->wap()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount, $quitUrl, $siteUrl);
+                $result = Factory::payment()->wap()->optional('passback_params', $passbackParams)->pay($title, $orderId, $totalAmount, $quitUrl, $returnUrl);
             }
             if ($this->response->success($result)) {
                 return $result->body ?? $result;

+ 1 - 1
crmeb/crmeb/services/pay/storage/AliPay.php

@@ -50,7 +50,7 @@ class AliPay extends BasePay implements PayInterface
             $code = true;
         }
 
-        return AliPayService::instance()->create($body, $orderId, $totalFee, $attach, $options['quitUrl'] ?? '', $options['siteUrl'] ?? '', $code);
+        return AliPayService::instance()->create($body, $orderId, $totalFee, $attach, $options['quitUrl'] ?? '', $options['returnUrl'] ?? '', $code);
     }
 
     /**