Hi,
I activated two factor authentication (2FA) by sms, using my own class that I puted in global codes server event. I receive the following error when I try to login:
C:\xampp\htdocs\telehealth\src\SmsTwoFactorAuthentication.php(42): Call to undefined method PHPMaker2024\TELEHEALTH\PedraSMS::load()
what's the problem?
class PedraSMS extends Sms {
// Send SMS
public function send() {
$phoneNumber = $this->Recipient; // Get phone number
$message = $this->Content; // Get SMS content
try {
date_default_timezone_set("Asia/Tehran");
// your panel configuration
$conf = new Configuration;
$conf->setConfig("SMSAPI");
$APIKey = $conf->ConfigValue;
$conf->setConfig("SMSKEY");
$SecretKey = $conf->ConfigValue;
$conf->setConfig("LOGINSMS");
$templateID = $conf->ConfigValue;
// message data
$data = array(
"ParameterArray" => array(
array(
"Parameter" => "VerificationCode",
"ParameterValue" => $message
)
),
"Mobile" => $phoneNumber,
"TemplateId" => $templateID
);
$SmsIR_UltraFastSend = new SmsIR_UltraFastSend($APIKey,$SecretKey);
$UltraFastSend = $SmsIR_UltraFastSend->UltraFastSend($data);
} catch (Exeption $e) {
echo 'Error UltraFastSend : '.$e->getMessage();
}
return true; // Send successful
}
}
Config("SMS_CLASS", PROJECT_NAMESPACE . "PedraSMS"); // Replace the default Sms class by your own class
Config("SMS_REGION_CODE", "+98"); // Override default SMS region code to GB
thanks
mansour