Update: 2026-06-23 18:44:45

This commit is contained in:
Hamza-Ayed
2026-06-23 18:44:45 +03:00
parent ed6e34cc4b
commit 3b2c2a86c6

View File

@@ -92,27 +92,27 @@ switch (strtolower($country)) {
case 'egypt':
$sentSuccessfully = sendKazumiSms($receiver, $otp);
if (!$sentSuccessfully) {
error_log("⚠️ [Egypt OTP Failover] Kazumi SMS failed. Falling back to Intaleq OTP WhatsApp.");
$sentSuccessfully = sendIntaleqOtp($receiver, $otp, 'whatsapp');
error_log("⚠️ [Egypt OTP Failover] Kazumi SMS failed. Falling back to Nabeh OTP.");
$sentSuccessfully = sendNabehOtp($receiver, $otp, 'text');
}
break;
case 'syria':
// Syria uses Intaleq app_key for whatsapp/sms
$sentSuccessfully = sendIntaleqOtp($receiver, $otp, $method ?: 'whatsapp');
// Syria uses Nabeh
$sentSuccessfully = sendNabehOtp($receiver, $otp, 'text');
break;
case 'jordan':
// Jordan uses Intaleq app_key for whatsapp/sms
$sentSuccessfully = sendIntaleqOtp($receiver, $otp, $method ?: 'whatsapp');
// Jordan uses Nabeh
$sentSuccessfully = sendNabehOtp($receiver, $otp, 'text');
break;
default:
// Default fallback to Kazumi SMS
$sentSuccessfully = sendKazumiSms($receiver, $otp);
if (!$sentSuccessfully) {
error_log("⚠️ [Default OTP Failover] Kazumi SMS failed. Falling back to Intaleq OTP WhatsApp.");
$sentSuccessfully = sendIntaleqOtp($receiver, $otp, 'whatsapp');
error_log("⚠️ [Default OTP Failover] Kazumi SMS failed. Falling back to Nabeh OTP.");
$sentSuccessfully = sendNabehOtp($receiver, $otp, 'text');
}
break;
}