From 73daf982aebd1e6a18dfa6bafa38b2272eaf93bc Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Wed, 5 Jun 2024 10:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/PayController.php | 2 ++ app/common/service/pay/PayService.php | 1 + 2 files changed, 3 insertions(+) diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index 7ac1c2d97..70a1ceddb 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -27,6 +27,8 @@ class PayController extends BaseApiController { $app = new PayService(1); $result = $app->wechat->callback(Request()->post()); + Log::info(json_decode($result,true)); + Log::info($result); if ($result && $result->event_type == 'TRANSACTION.SUCCESS') { $ciphertext = $result->resource['ciphertext']; if ($ciphertext['trade_state'] === 'SUCCESS') { diff --git a/app/common/service/pay/PayService.php b/app/common/service/pay/PayService.php index 3fab75436..89c7f314e 100644 --- a/app/common/service/pay/PayService.php +++ b/app/common/service/pay/PayService.php @@ -52,6 +52,7 @@ class PayService extends BasePayService { $this->terminal = $terminal; $config = Config::get('payment'); + $config['wechat']['default']['notify_url'] = 'https://test-admin-multi-store.lihaink.cn'.$config['wechat']['default']['notify_url']; Pay::config($config); if ($userId !== null) { $this->auth = UserAuth::where(['user_id' => $userId, 'terminal' => $terminal])->findOrEmpty();