feat: 银行对接
This commit is contained in:
parent
3ee760e3a7
commit
a74a8f7765
|
@ -97,7 +97,15 @@ class WithdrawController
|
||||||
//同意
|
//同意
|
||||||
$userbank = Userbank::where('user_id', $user_id)->first();
|
$userbank = Userbank::where('user_id', $user_id)->first();
|
||||||
if ($userbank) {
|
if ($userbank) {
|
||||||
PaymentNew::pushMoney($amount, $userbank->bank_username, $userbank->account, $userbank->bank_name, $id);
|
$res = PaymentNew::pushMoney($amount, $userbank->bank_username, $userbank->account, $userbank->bank_name, $id);
|
||||||
|
if(!$res->Success){
|
||||||
|
$Withdraw = Withdraw::where('id', $id)->first();
|
||||||
|
$Withdraw->status = 5;
|
||||||
|
$Withdraw->status_text = '支付失败:用户银行信息存在问题';
|
||||||
|
$Withdraw->save();
|
||||||
|
UserRewardDao::base($user_id, 1, $money, '提现失败返还');
|
||||||
|
return ApiResponse::error(null, '用户银行信息存在问题');
|
||||||
|
}
|
||||||
$Withdraw = Withdraw::where('id', $id)->first();
|
$Withdraw = Withdraw::where('id', $id)->first();
|
||||||
$Withdraw->status = 2;
|
$Withdraw->status = 2;
|
||||||
$Withdraw->status_text = '已到账';
|
$Withdraw->status_text = '已到账';
|
||||||
|
|
Loading…
Reference in New Issue