diff --git a/backend/auth/otp/providers.php b/backend/auth/otp/providers.php index fd0b791c..a29b4bd8 100644 --- a/backend/auth/otp/providers.php +++ b/backend/auth/otp/providers.php @@ -196,6 +196,7 @@ function _nabehOtpAttempt(string $phone, string $type, string $otp, string $appN if ($decoded) { $statusStr = strtolower((string)($decoded['status'] ?? '')); $msgStr = strtolower((string)($decoded['message'] ?? '')); + $errStr = strtolower((string)($decoded['error'] ?? '')); if ( !empty($decoded['success']) || in_array($statusStr, ['success', 'ok', 'true', '200', 'sent', 'queued', '1'], true) || @@ -206,7 +207,8 @@ function _nabehOtpAttempt(string $phone, string $type, string $otp, string $appN !empty($decoded['token']) || strpos($msgStr, 'success') !== false || strpos($msgStr, 'sent') !== false || - strpos($msgStr, 'تم') !== false + strpos($msgStr, 'تم') !== false || + strpos($errStr, 'via gateway') !== false ) { return true; }