push terakhir

This commit is contained in:
hafifierahman
2022-05-08 19:56:28 +08:00
parent dc86998f5c
commit 6a0602a2be
4 changed files with 87 additions and 112 deletions
+16 -15
View File
@@ -30,11 +30,12 @@ class TacController extends Controller
public function requestKadPengenalan(Request $request){
$currentDateTime = Carbon::now();
$expiretac = tacportal::where('icno',$request->icno)
->whereDate('created_at','=',$currentDateTime)
->whereDate('expired_at','=',$currentDateTime)
->whereTime('expired_at','>=',$currentDateTime->toDateTimeString())
->where('created_at','<=',$currentDateTime->toDateTimeString())
->whereTime('expired_at','>=',$currentDateTime->toTimeString())
->whereTime('created_at','<=',$currentDateTime->toTimeString())
->latest()
->first();
@@ -69,7 +70,7 @@ class TacController extends Controller
$currentDateTime = Carbon::now();
$expired_at = Carbon::now()->addMinutes(15);
$expired_at = Carbon::now()->addMinutes(5);
$tac_token = $this->randum_number(6,2,false);
@@ -83,21 +84,21 @@ class TacController extends Controller
$tac->save();
// $mobileno = '6' . $customer['notelefon'];
$mobileno = '601114884900';
$mobileno = '6' . $customer['notelefon'];
// $mobileno = '601114884900';
$messages = 'AR-RAHN PKB PORTAL : TAC: ' . $tac_token . ' ' . $currentDateTime . '. AR-RAHN CARELINE CENTRE 1300-22-4343';
// $status = Http::get('http://gateway.onewaysms.com.my:10001/api.aspx',[
// 'apiusername' => 'APIUK330HDAFO',
// 'apipassword' => 'APIUK330HDAFOUK330',
// 'senderid' => 'INFO',
// 'mobileno' => $mobileno,
// 'message'=> $messages,
// 'languagetype'=> 1
// ]);
$status = Http::get('http://gateway.onewaysms.com.my:10001/api.aspx',[
'apiusername' => 'APIUK330HDAFO',
'apipassword' => 'APIUK330HDAFOUK330',
'senderid' => 'INFO',
'mobileno' => $mobileno,
'message'=> $messages,
'languagetype'=> 1
]);
// return response($status);
return response(1);
return response($status);
// return response(1);
}
private function randum_number($len = 6,$dup = 1, $sort = false){