OTP message
This commit is contained in:
@@ -139,34 +139,9 @@ abstract class BaseController extends Controller
|
||||
return $password;
|
||||
}
|
||||
|
||||
public function sendSMS($to_number):string{
|
||||
public function sendSMS($to_number, $sms_message):string{
|
||||
$API_KEY ="TLYsgMTZBeasJHHimcWXG1QPHmjH7FPwnbKwiqTEwGCu6TrK0v13hCn8N6SYZp";
|
||||
$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);
|
||||
|
||||
$curl = curl_init();
|
||||
@@ -174,7 +149,7 @@ abstract class BaseController extends Controller
|
||||
$data = array(
|
||||
"to"=> $to_number,
|
||||
"from"=> "DigiFI",
|
||||
"sms"=> "Hi there, testing 123456",
|
||||
"sms"=> $sms_message,
|
||||
"type"=> "plain",
|
||||
"channel"=> "generic",
|
||||
"api_key"=> $API_KEY,
|
||||
|
||||
Reference in New Issue
Block a user