From f12b537d71fb907e2ee5e3cf70303cb17e797877 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Wed, 5 Jun 2024 10:36:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=94=AF=E4=BB=98=E5=9B=9E?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/PayController.php | 5 +++-- app/common/service/pay/PayService.php | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/controller/PayController.php b/app/api/controller/PayController.php index 70a1ceddb..8bbf48f80 100644 --- a/app/api/controller/PayController.php +++ b/app/api/controller/PayController.php @@ -6,6 +6,7 @@ use app\common\enum\PayEnum; use app\common\logic\PayNotifyLogic; use app\common\model\retail\Cashierclass; use app\common\service\pay\PayService; +use support\Cache; use support\Log; use hg\apidoc\annotation as ApiDoc; #[ApiDoc\NotParse()] @@ -27,8 +28,8 @@ class PayController extends BaseApiController { $app = new PayService(1); $result = $app->wechat->callback(Request()->post()); - Log::info(json_decode($result,true)); - Log::info($result); + Cache::set('log'.time(),$result); + Cache::set('logJ'.time(),json_encode($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 89c7f314e..3fab75436 100644 --- a/app/common/service/pay/PayService.php +++ b/app/common/service/pay/PayService.php @@ -52,7 +52,6 @@ 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();