From 0ee3655c056878ea4c56d45409bbef0c0ca14f8a Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Tue, 21 Jul 2026 19:31:02 +0300 Subject: [PATCH] Update: 2026-07-21 19:31:02 --- backend/auth/otp/providers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }