efps-version
elf 1 year ago
commit 5c66ddbb08

@ -325,9 +325,9 @@ class RechargeController extends AbstractController
if (empty($log)) { if (empty($log)) {
throw new BusinessException('预支付记录不存在'); throw new BusinessException('预支付记录不存在');
} }
// if ($log->created_at->timestamp < time() - 5*60) { if ($log->created_at->timestamp < time() - 5*60) {
// throw new BusinessException('支付超时,请重新请求'); throw new BusinessException('支付超时,请重新请求');
// } }
$app = App::where('app_id', $log->app_id)->first(); $app = App::where('app_id', $log->app_id)->first();
if (empty($app)) { if (empty($app)) {
throw new BusinessException('应用异常'); throw new BusinessException('应用异常');

@ -7,8 +7,7 @@ namespace App\Service;
use App\Exception\BusinessException; use App\Exception\BusinessException;
use App\Helper\Efps\Api; use App\Helper\Efps\Api;
use App\Helper\Efps\Result; use App\Helper\Efps\Result;
use App\Helper\Redis; use App\Helper\Log;
use App\Helper\RedisKey;
use App\Helper\StringHelper; use App\Helper\StringHelper;
use App\Model\App; use App\Model\App;
use App\Model\BankCard; use App\Model\BankCard;
@ -83,7 +82,7 @@ class PaymentService extends AbstractService
$app = $req->getApp(); $app = $req->getApp();
$data = $req->getData(); $data = $req->getData();
if ($data['payAmount'] > 3000) { if ($data['payAmount'] > 300000) {
throw new BusinessException('超出限额'); throw new BusinessException('超出限额');
} }
@ -97,6 +96,7 @@ class PaymentService extends AbstractService
$user = User::where('app_id', $app->app_id)->where('out_member_id', $data['outMemberId'])->first(); $user = User::where('app_id', $app->app_id)->where('out_member_id', $data['outMemberId'])->first();
if (!$user) { if (!$user) {
Log::error('UserUndefiend: ', $data);
throw new BusinessException('用户不存在'); throw new BusinessException('用户不存在');
} }
$order = $this->createOrder($app, $data, $user); $order = $this->createOrder($app, $data, $user);
@ -159,7 +159,8 @@ class PaymentService extends AbstractService
$result = Api::bindCard($reqData); $result = Api::bindCard($reqData);
if (!$result->isSuccess()) { if (!$result->isSuccess()) {
throw new BusinessException($result->getMessage()); $message = $result->getMessage();
throw new BusinessException($message == '支付渠道未配置' ? '暂不支持该银行卡' : $message);
} }
$user = User::where('member_id', $memberId)->first(); $user = User::where('member_id', $memberId)->first();
@ -347,6 +348,7 @@ class PaymentService extends AbstractService
throw new BusinessException('请输入金额'); throw new BusinessException('请输入金额');
} }
if ($reqData['amount'] < 100 || $reqData['amount'] > 300000) { if ($reqData['amount'] < 100 || $reqData['amount'] > 300000) {
Log::error('reqData:', $reqData);
throw new BusinessException('充值金额必须为100~300000'); throw new BusinessException('充值金额必须为100~300000');
} }
} }

@ -38,6 +38,22 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="24">
<h3>支持的银行</h3>
<el-table
:show-header="false"
:data="banks"
style="width: 100%">
<el-table-column prop="bank1">
</el-table-column>
<el-table-column prop="bank2">
</el-table-column>
<el-table-column prop="bank3">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog title="绑卡验证码" :visible.sync="bindConfirmVisible" width="30%"> <el-dialog title="绑卡验证码" :visible.sync="bindConfirmVisible" width="30%">
@ -99,6 +115,28 @@
amount: 1, amount: 1,
remark: '' remark: ''
}, },
banks: [
{
bank1: '中国工商银行',
bank2: '中国邮政银行',
bank3: '浦发银行',
},
{
bank1: '广发银行',
bank2: '民生银行',
bank3: '光大银行',
},
{
bank1: '中信银行',
bank2: '华夏银行',
bank3: '平安银行',
},
{
bank1: '上海银行',
bank2: '区域性银行',
bank3: '',
}
],
amountDisabled: false amountDisabled: false
} }
}, },

Loading…
Cancel
Save