|
|
@@ -61,7 +61,15 @@ class Wallet extends BaseController
|
|
|
if ($params['payment_type'] == 'rgcz') {
|
|
|
return $this->error('参数有误');
|
|
|
}
|
|
|
+
|
|
|
$member_id = request()->user->member_id;
|
|
|
+ $user = User::where('member_id', $member_id)->first();
|
|
|
+ //校验是否支持此充值方式
|
|
|
+ $check = RechargeChannel::checkRechargeChannel($params['payment_type'], $user->recharge_channel_group_id);
|
|
|
+ if ($check === false) {
|
|
|
+ throw new Exception(lang("不支持此充值方式").$user->recharge_channel_group_id);
|
|
|
+ }
|
|
|
+
|
|
|
$res = PaymentOrderService::createPay($member_id, $params['amount'], $params['payment_type']);
|
|
|
if ($res['code'] == 0) {
|
|
|
return $this->success($res);
|
|
|
@@ -130,7 +138,15 @@ class Wallet extends BaseController
|
|
|
'toAddress' => ['required', 'string'],
|
|
|
'image' => ['required', 'url'],
|
|
|
]);
|
|
|
+
|
|
|
$member_id = request()->user->member_id;
|
|
|
+ $user = User::where('member_id', $member_id)->first();
|
|
|
+
|
|
|
+ //校验是否支持此充值方式
|
|
|
+ $check = RechargeChannel::checkRechargeChannel('usdt', $user->recharge_channel_group_id);
|
|
|
+ if ($check === false) {
|
|
|
+ throw new Exception(lang("不支持此充值方式"));
|
|
|
+ }
|
|
|
$recharge = new Recharge();
|
|
|
$recharge->member_id = $member_id;
|
|
|
$recharge->net = $params['net'];
|
|
|
@@ -159,6 +175,15 @@ class Wallet extends BaseController
|
|
|
'amount' => ['required', 'numeric', 'min:0.01'],
|
|
|
'payment_type' => ['required', 'integer'],
|
|
|
]);
|
|
|
+
|
|
|
+ $member_id = request()->user->member_id;
|
|
|
+ $user = User::where('member_id', $member_id)->first();
|
|
|
+
|
|
|
+ //校验是否支持此充值方式
|
|
|
+ $check = RechargeChannel::checkRechargeChannel('rgcz', $user->recharge_channel_group_id);
|
|
|
+ if ($check === false) {
|
|
|
+ throw new Exception(lang("不支持此充值方式"));
|
|
|
+ }
|
|
|
|
|
|
$data = [];
|
|
|
$data['type'] = PaymentOrderService::TYPE_SELF_PAY;
|
|
|
@@ -240,7 +265,12 @@ class Wallet extends BaseController
|
|
|
if (!password_verify($params['safe_word'], $user->payment_password)) {
|
|
|
throw new Exception(lang('资金密码错误'));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ //校验是否支持此提现方式
|
|
|
+ $check = RechargeChannel::checkWithdrawChannel('usdt', $user->recharge_channel_group_id);
|
|
|
+ if ($check === false) {
|
|
|
+ throw new Exception(lang("不支持此提现方式"));
|
|
|
+ }
|
|
|
$serviceCharge = (new WithdrawService())->serviceCharge;
|
|
|
$amount = $params['amount'];
|
|
|
$address = $params['address'];
|
|
|
@@ -312,7 +342,15 @@ class Wallet extends BaseController
|
|
|
if (!password_verify($params['safe_word'], $user->payment_password)) {
|
|
|
throw new Exception(lang('资金密码错误'));
|
|
|
}
|
|
|
+
|
|
|
+ //校验是否支持此提现方式
|
|
|
+ $check = RechargeChannel::checkWithdrawChannel($params['channel'], $user->recharge_channel_group_id);
|
|
|
+ if ($check === false) {
|
|
|
+ throw new Exception(lang("不支持此提现方式"));
|
|
|
+ }
|
|
|
+
|
|
|
if ($params['channel'] == 'rgtx') {
|
|
|
+
|
|
|
DB::beginTransaction();
|
|
|
$amount = $params['amount'];
|
|
|
try {
|