增加每天只能提现三次 增加支付状态报401返回
This commit is contained in:
parent
09293d5af9
commit
60e316e089
|
@ -152,6 +152,17 @@ class PaymentNew
|
|||
}
|
||||
} catch (\GuzzleHttp\Exception\RequestException $e) {
|
||||
Log::warning("请求支付api失未知失败:" . $e->getMessage());
|
||||
// 如果是 400 错误,可能有额外的请求错误信息
|
||||
if ($e->hasResponse()) {
|
||||
$response = $e->getResponse();
|
||||
$httpCode = $response->getStatusCode();
|
||||
if ($httpCode == 400) {
|
||||
$responseBody = $response->getBody()->getContents();
|
||||
Log::warning("请求支付api失败,状态码 400,响应体:" . $responseBody);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,6 +104,11 @@ class WithdrawController
|
|||
//用户存了一个 转账信息 这里是用户转账信息的id
|
||||
$bank_id = $request->post('bank_id');
|
||||
$user_id = $request->data['id'];
|
||||
$today = date('Y-m-d');
|
||||
//判断用户今天提现几次
|
||||
if(Withdraw::where('user_id',$user_id)->where('created_at', '>=', $today . " 00:00:00")->count()>=3){
|
||||
return ApiResponseApp::error(null, '每天只能提现三次');
|
||||
}
|
||||
$user = User::find($user_id);
|
||||
//提现金额
|
||||
$rate = ExchangeRate::where('type', 'BDT')->get();
|
||||
|
|
Loading…
Reference in New Issue