From 5f3dceaca1deb422a9c56b414b19524e177cd6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Mon, 27 Dec 2021 14:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/WeChatPayService.php | 2 +- config/wechat.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Services/WeChatPayService.php b/app/Services/WeChatPayService.php index 865d1d75..a3ad2ed3 100644 --- a/app/Services/WeChatPayService.php +++ b/app/Services/WeChatPayService.php @@ -55,7 +55,7 @@ class WeChatPayService */ public function pay(array $params) { - if (isset($params['notify_url'])) { + if (! isset($params['notify_url'])) { $params['notify_url'] = url(route('wxpay.paid_notify', [], false), [], true); } diff --git a/config/wechat.php b/config/wechat.php index d3303768..ea02f988 100644 --- a/config/wechat.php +++ b/config/wechat.php @@ -10,6 +10,18 @@ return [ 'cert_path' => env('WECHAT_PAYMENT_CERT_PATH'), // 绝对地址 'key_path' => env('WECHAT_PAYMENT_KEY_PATH'), // 绝对地址 'notify_url' => env('WECHAT_PAYMENT_NOTIFY_URL'), + + // 日志 + 'log' => [ + 'default' => 'daily', + 'channels' => [ + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/wxpay.log'), + 'level' => 'info', + ], + ], + ], ], ], ];