[NSFW] Number not encoded in SMS Service API call
-
the number should be encoded with urlencode in the send_sms function of class Contact_Form_Sms_Integration_abn_Functions
solution:
public function send_sms($phone, $message)
{
$message = urlencode($message);
$phone = urlencode($phone);
$link = get_option(Contact_FormSI_DB_SLUG . ‘api_urls’, ”);
if (!empty($link)) {
$link = str_replace(array(‘{MOBILENUMBER}’, ‘{MESSAGE}’), array($phone, $message), $link);
$response = wp_remote_get($link);
return $response;
}
return false;
}this would help with error cause when making a call request to send sms to international numbers using
so api using E.164 international standard to verify numbers wouldn’t have error
bacause if the number is not url-encoded the sms api wouldn’t read the + sign
- The topic ‘[NSFW] Number not encoded in SMS Service API call’ is closed to new replies.