From 24b23aa085483b3d813fa7d5324ffeeaf67b1175 Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 20 Jun 2023 12:26:09 +0800 Subject: [PATCH] yh --- app/Service/PaymentService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Service/PaymentService.php b/app/Service/PaymentService.php index 09a8aff..57bab0f 100644 --- a/app/Service/PaymentService.php +++ b/app/Service/PaymentService.php @@ -7,8 +7,7 @@ namespace App\Service; use App\Exception\BusinessException; use App\Helper\Efps\Api; use App\Helper\Efps\Result; -use App\Helper\Redis; -use App\Helper\RedisKey; +use App\Helper\Log; use App\Helper\StringHelper; use App\Model\App; use App\Model\BankCard; @@ -159,7 +158,8 @@ class PaymentService extends AbstractService $result = Api::bindCard($reqData); if (!$result->isSuccess()) { - throw new BusinessException($result->getMessage()); + $message = $result->getMessage(); + throw new BusinessException($message == '支付渠道未配置' ? '暂不支持该银行卡' : $message); } $user = User::where('member_id', $memberId)->first(); @@ -347,6 +347,7 @@ class PaymentService extends AbstractService throw new BusinessException('请输入金额'); } if ($reqData['amount'] < 100 || $reqData['amount'] > 300000) { + Log::error('reqData:', $reqData); throw new BusinessException('充值金额必须为100~300000'); } }