OTP message
This commit is contained in:
@@ -139,34 +139,9 @@ abstract class BaseController extends Controller
|
|||||||
return $password;
|
return $password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendSMS($to_number):string{
|
public function sendSMS($to_number, $sms_message):string{
|
||||||
$API_KEY ="TLYsgMTZBeasJHHimcWXG1QPHmjH7FPwnbKwiqTEwGCu6TrK0v13hCn8N6SYZp";
|
$API_KEY ="TLYsgMTZBeasJHHimcWXG1QPHmjH7FPwnbKwiqTEwGCu6TrK0v13hCn8N6SYZp";
|
||||||
$BASE_URL = "https://api.ng.termii.com";
|
$BASE_URL = "https://api.ng.termii.com";
|
||||||
// $curl = curl_init();
|
|
||||||
// $data = array("api_key" => $API_KEY, "to" => $to_number, "from" => "talert",
|
|
||||||
// "sms" => "Hi there, testing Termii ", "type" => "plain", "channel" => "generic" );
|
|
||||||
//
|
|
||||||
// $post_data = json_encode($data);
|
|
||||||
//
|
|
||||||
// curl_setopt_array($curl, array(
|
|
||||||
// CURLOPT_URL => $BASE_URL."/api/sms/send",
|
|
||||||
// CURLOPT_RETURNTRANSFER => true,
|
|
||||||
// CURLOPT_ENCODING => "",
|
|
||||||
// CURLOPT_MAXREDIRS => 10,
|
|
||||||
// CURLOPT_TIMEOUT => 0,
|
|
||||||
// CURLOPT_FOLLOWLOCATION => true,
|
|
||||||
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
|
||||||
// CURLOPT_CUSTOMREQUEST => "POST",
|
|
||||||
// CURLOPT_POSTFIELDS => $post_data,
|
|
||||||
// CURLOPT_HTTPHEADER => array(
|
|
||||||
// "Content-Type: application/json"
|
|
||||||
// ),
|
|
||||||
// ));
|
|
||||||
//
|
|
||||||
// $response = curl_exec($curl);
|
|
||||||
//
|
|
||||||
// curl_close($curl);
|
|
||||||
// return $response;
|
|
||||||
log_message('error', "SMS TO API---=>". $to_number);
|
log_message('error', "SMS TO API---=>". $to_number);
|
||||||
|
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
@@ -174,7 +149,7 @@ abstract class BaseController extends Controller
|
|||||||
$data = array(
|
$data = array(
|
||||||
"to"=> $to_number,
|
"to"=> $to_number,
|
||||||
"from"=> "DigiFI",
|
"from"=> "DigiFI",
|
||||||
"sms"=> "Hi there, testing 123456",
|
"sms"=> $sms_message,
|
||||||
"type"=> "plain",
|
"type"=> "plain",
|
||||||
"channel"=> "generic",
|
"channel"=> "generic",
|
||||||
"api_key"=> $API_KEY,
|
"api_key"=> $API_KEY,
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ class Employers extends BaseController
|
|||||||
];
|
];
|
||||||
$addedData = $this->insert_db('employer_checks',$udata);
|
$addedData = $this->insert_db('employer_checks',$udata);
|
||||||
|
|
||||||
$this->sendSMS($to_number);
|
$sms_message = "Your OTP = 1234";
|
||||||
|
$this->sendSMS($to_number, $sms_message);
|
||||||
|
|
||||||
$checkData = $this->APIcall("POST", "http://10.10.10.48:6332/api/verify/employer", json_encode($api_data));
|
$checkData = $this->APIcall("POST", "http://10.10.10.48:6332/api/verify/employer", json_encode($api_data));
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user