添加批零提现到银行卡需要支付密码
parent
0e53eb73d3
commit
e3c5ce45dc
|
|
@ -8,6 +8,7 @@ use App\Endpoint\Api\Http\Resources\Dealer\WalletToBankLogResource;
|
||||||
use App\Endpoint\Api\Http\Resources\Dealer\WalletToBankLogSimpleResource;
|
use App\Endpoint\Api\Http\Resources\Dealer\WalletToBankLogSimpleResource;
|
||||||
use App\Enums\DealerWalletAction;
|
use App\Enums\DealerWalletAction;
|
||||||
use App\Exceptions\BizException;
|
use App\Exceptions\BizException;
|
||||||
|
use App\Exceptions\PayPasswordIncorrectException;
|
||||||
use App\Helpers\Paginator as PaginatorHelper;
|
use App\Helpers\Paginator as PaginatorHelper;
|
||||||
use App\Models\DealerWalletToBankLog;
|
use App\Models\DealerWalletToBankLog;
|
||||||
use App\Services\Dealer\WalletService;
|
use App\Services\Dealer\WalletService;
|
||||||
|
|
@ -41,10 +42,18 @@ class WalletController extends Controller
|
||||||
{
|
{
|
||||||
$input = $request->validate([
|
$input = $request->validate([
|
||||||
'amount' => ['bail', 'required', 'int', 'min:1'],
|
'amount' => ['bail', 'required', 'int', 'min:1'],
|
||||||
|
'pay_password' => ['bail', 'required', 'string'],
|
||||||
|
], [], [
|
||||||
|
'amount' => '提现金额',
|
||||||
|
'pay_password' => '支付密码',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
$amount = Arr::get($input, 'amount', 0);
|
$amount = Arr::get($input, 'amount', 0);
|
||||||
|
//验证支付密码
|
||||||
|
if (! $user->wallet?->verifyPassword($input['pay_password'] ?? '')) {
|
||||||
|
throw new PayPasswordIncorrectException();
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($user->dealer->pay_info)) {
|
if (empty($user->dealer->pay_info)) {
|
||||||
throw new BizException('请先绑定设置收款信息');
|
throw new BizException('请先绑定设置收款信息');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue