fix(auth): require verified identity for wallet and gift card
This commit is contained in:
@@ -370,6 +370,7 @@ class WalletController extends Controller
|
||||
public function withdraw(Request $request)
|
||||
{
|
||||
$customer = auth('customer')->user();
|
||||
self::assertCustomerIdentityVerified($customer instanceof Customer ? $customer : null);
|
||||
$data = $request->all();
|
||||
if (!isset($data['card_id'])) {
|
||||
return response()->json(['message' => 'لطفا کارت بانکی را وارد کنید'], 422);
|
||||
@@ -706,6 +707,7 @@ class WalletController extends Controller
|
||||
$this->validateWithdrawAmount((int) $data['value']);
|
||||
|
||||
$customer = auth('customer')->user();
|
||||
self::assertCustomerIdentityVerified($customer instanceof Customer ? $customer : null);
|
||||
$otp = rand(1000, 9999);
|
||||
$customer->token_sms = $otp;
|
||||
$customer->save();
|
||||
|
||||
Reference in New Issue
Block a user