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', + ], + ], + ], ], ], ];