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);