From ab517f7ab74267156ea9b72042d198ed0eff41b9 Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 20 Jun 2023 17:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/Recharge/RechargeController.php | 6 +++--- app/Service/PaymentService.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Controller/Recharge/RechargeController.php b/app/Controller/Recharge/RechargeController.php index 366292b..244bebd 100644 --- a/app/Controller/Recharge/RechargeController.php +++ b/app/Controller/Recharge/RechargeController.php @@ -325,9 +325,9 @@ class RechargeController extends AbstractController if (empty($log)) { throw new BusinessException('预支付记录不存在'); } - // if ($log->created_at->timestamp < time() - 5*60) { - // throw new BusinessException('支付超时,请重新请求'); - // } + if ($log->created_at->timestamp < time() - 5*60) { + throw new BusinessException('支付超时,请重新请求'); + } $app = App::where('app_id', $log->app_id)->first(); if (empty($app)) { throw new BusinessException('应用异常'); diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index 9f736ff..92c5a03 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -96,6 +96,7 @@ class PaymentService extends AbstractService $user = User::where('app_id', $app->app_id)->where('out_member_id', $data['outMemberId'])->first(); if (!$user) { + Log::error('UserUndefiend: ', $data); throw new BusinessException('用户不存在'); } $order = $this->createOrder($app, $data, $user);