diff --git a/backend/auth/otp/providers.php b/backend/auth/otp/providers.php index a6011bd..e1aa000 100644 --- a/backend/auth/otp/providers.php +++ b/backend/auth/otp/providers.php @@ -180,9 +180,12 @@ function sendIntaleqOtp(string $receiver, string $otp, string $method = 'whatsap return false; } + // Normalize receiver to start with + + $phoneWithPlus = (strpos($receiver, '+') === 0) ? $receiver : '+' . $receiver; + $apiUrl = 'https://otp.intaleqapp.com/api/request-otp.php'; $payload = [ - 'phone' => $receiver, + 'phone' => $phoneWithPlus, 'app_key' => $appKey, 'device_type' => 'android', 'method' => $method,