<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class AuthorizationController extends Controller
{
public function showGoogle2FAForm()
{
$page_title = __("admin.page.google.2fa.verification");
return view('admin.auth.authorize.verify-google-2fa',compact('page_title'));
}
public function google2FASubmit(Request $request) {
$request->validate([
'code' => "required|string",
]);
$code = $request->code;
$user = auth()->user();
if(!$user->two_factor_secret) {
return back()->with(['warning' => [__("Your secret key not stored properly. Please contact with system administrator")]]);
}
if(google_2fa_verify($user->two_factor_secret,$code)) {
$user->update([
'two_factor_verified' => true,
]);
return redirect()->intended(route('admin.dashboard'));
}
return back()->with(['error' => [__("Invalid code. Please try again")]]);
}
}
Save Cards
Simplify your payment experience by securely saving your card on our platform. After your initial transaction, you can choose to store your card details safely for future use. This feature eliminates the need to re-enter your payment information each time, making checkouts faster while keeping your data secure with advanced encryption and robust security measures.