|
|
@ -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');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|