|
|
@@ -271,9 +271,16 @@ class Wallet extends BaseController
|
|
|
if ($check === false) {
|
|
|
throw new Exception(lang("不支持此提现方式"));
|
|
|
}
|
|
|
- $serviceCharge = (new WithdrawService())->serviceCharge;
|
|
|
+
|
|
|
$amount = $params['amount'];
|
|
|
$address = $params['address'];
|
|
|
+
|
|
|
+ //校验提现金额的限制
|
|
|
+ if ($amount < $check->min || $amount > $check->max) {
|
|
|
+ throw new Exception(lang("提现金额超出限制"));
|
|
|
+ }
|
|
|
+
|
|
|
+ $serviceCharge = (new WithdrawService())->serviceCharge;
|
|
|
$real = bcsub($amount, $serviceCharge, 10);
|
|
|
$real = floatval($real);
|
|
|
|
|
|
@@ -348,11 +355,16 @@ class Wallet extends BaseController
|
|
|
if ($check === false) {
|
|
|
throw new Exception(lang("不支持此提现方式"));
|
|
|
}
|
|
|
+
|
|
|
+ $amount = $params['amount'];
|
|
|
+ //校验提现金额的限制
|
|
|
+ if ($amount < $check->min || $amount > $check->max) {
|
|
|
+ throw new Exception(lang("提现金额超出限制"));
|
|
|
+ }
|
|
|
|
|
|
if ($params['channel'] == 'rgtx') {
|
|
|
|
|
|
DB::beginTransaction();
|
|
|
- $amount = $params['amount'];
|
|
|
try {
|
|
|
$wallet = WalletService::findOne(['member_id' => $member_id]);
|
|
|
if (!$wallet) throw new Exception('钱包不存在', HttpStatus::CUSTOM_ERROR);
|