From 389ffd2b2dcc3c5f99908238fdfdc8687ca03dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Fri, 28 Jun 2024 14:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98=E5=AE=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/v1/marketing/StoreBargain.php | 2 +- .../api/controller/v1/activity/StoreBargainController.php | 4 ++-- .../app/api/controller/v1/store/StoreProductController.php | 2 +- crmeb/app/services/pay/OrderPayServices.php | 5 +++++ crmeb/crmeb/services/AliPayService.php | 6 +++--- crmeb/crmeb/services/pay/storage/AliPay.php | 2 +- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/marketing/StoreBargain.php b/crmeb/app/adminapi/controller/v1/marketing/StoreBargain.php index ee1e5161..3a4a6f23 100644 --- a/crmeb/app/adminapi/controller/v1/marketing/StoreBargain.php +++ b/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')); } diff --git a/crmeb/app/api/controller/v1/activity/StoreBargainController.php b/crmeb/app/api/controller/v1/activity/StoreBargainController.php index 11eb4d27..cc9ad25d 100644 --- a/crmeb/app/api/controller/v1/activity/StoreBargainController.php +++ b/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); } diff --git a/crmeb/app/api/controller/v1/store/StoreProductController.php b/crmeb/app/api/controller/v1/store/StoreProductController.php index a1970fdb..e4f16ccf 100644 --- a/crmeb/app/api/controller/v1/store/StoreProductController.php +++ b/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], diff --git a/crmeb/app/services/pay/OrderPayServices.php b/crmeb/app/services/pay/OrderPayServices.php index 3be4ce03..163668d3 100644 --- a/crmeb/app/services/pay/OrderPayServices.php +++ b/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; } diff --git a/crmeb/crmeb/services/AliPayService.php b/crmeb/crmeb/services/AliPayService.php index b95a5250..bdf94394 100644 --- a/crmeb/crmeb/services/AliPayService.php +++ b/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; diff --git a/crmeb/crmeb/services/pay/storage/AliPay.php b/crmeb/crmeb/services/pay/storage/AliPay.php index 483fc356..8b2e7b78 100644 --- a/crmeb/crmeb/services/pay/storage/AliPay.php +++ b/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); } /**