update arrahnpay

This commit is contained in:
nishaMuhd
2023-03-22 11:00:31 +08:00
parent 8e2ea34d93
commit 56c639b909
9 changed files with 689 additions and 5 deletions
@@ -4,7 +4,8 @@ namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Password;
class ForgotPasswordController extends Controller
{
/*
@@ -113,3 +113,8 @@ class RegisterController extends Controller
return view('auth.termasyarat', compact('termasyarat'));
}
}
public function forgotemel()
{
return view('auth.forgotemail2');
}
@@ -41,7 +41,8 @@ class InformationController extends Controller
if(isset($CustomerInfo['lelong'])){
if(sizeof($CustomerInfo['lelong']) > 0){
foreach($CustomerInfo['lelong'] as $index=>$lelong){
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json();
// $array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://adminbid.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json();
$array_lelong = Http::withOptions(['verify' => config('app.api_verify')])->get('https://niklah.arrahn.com.my/api/portalApi',['norujukan' => $lelong['norujukan']])->json();
if($array_lelong['lelong'] !== null){
$CustomerInfo['lelong'][$index] = collect($lelong)->merge($array_lelong['lelong'])->toArray();
+50
View File
@@ -27,6 +27,20 @@ class TacController extends Controller
}
}
public function TACrequestfe(Request $request){
$tac = tacportal::where([['icno',$request->icno],['tac_no',$request->tac]])->get()->toArray();
// dd($tac);
if($tac){
// dd($request->icno);
$emel = User::where('icno','=', $request->icno)->first()->toArray();
return response(['status' => 1, 'useremel' => $emel]);
}else{
return response(['status' => 0]);
}
}
public function requestKadPengenalan(Request $request){
@@ -67,6 +81,42 @@ class TacController extends Controller
}
}
public function requestKadPengenalanfe(Request $request){
$currentDateTime = Carbon::now();
$expiretac = tacportal::where('icno',$request->icno)
->whereDate('created_at','=',$currentDateTime)
->whereDate('expired_at','=',$currentDateTime)
->whereTime('expired_at','>=',$currentDateTime->toTimeString())
->whereTime('created_at','<=',$currentDateTime->toTimeString())
->latest()
->first();
if($expiretac){
return response(['notexpired' => true]);
}
$CustomerInfo = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') .'/api/customers/' . $request->icno)->json();
if($CustomerInfo)
{
$generatestatus = $this->generateTAC($CustomerInfo);
if($generatestatus){
$backphone = substr($CustomerInfo['telefon'],-4);
return response(['notelefon' => $backphone,'status' => 1]);
}else{
}
}else{
return response(['status' => 0],200);
}
}
private function generateTAC($customer){