GWM
This commit is contained in:
parent
d4343ed967
commit
d9dd4068f0
@ -16,6 +16,8 @@ if (!function_exists('sendOtpSms')) {
|
||||
// Replace variables {#var#}
|
||||
$message = "Hi, Your One Time Code for logging into Nhance {$appName} App is {$otp}. Valid for 3 minutes. Please do not share this with anyone. -NHANCE";
|
||||
|
||||
log_message('info' , 'SMS - Message '.$message);
|
||||
|
||||
// Build the API URL
|
||||
$url = "https://smsapi.24x7sms.com/api_2.0/SendSMS.aspx?" . http_build_query([
|
||||
'APIKEY' => $apiKey,
|
||||
@ -29,6 +31,8 @@ if (!function_exists('sendOtpSms')) {
|
||||
// Send request
|
||||
$response = @file_get_contents($url);
|
||||
|
||||
log_message('info' , 'SMS - Response '.$response);
|
||||
|
||||
// If response failed
|
||||
if ($response === FALSE) {
|
||||
return ['status' => 'failed', 'message' => 'Failed to send SMS.'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user