From 3a29f26d56008d2a0237896bc7bb9318a8691baa Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 6 May 2026 03:13:03 +0300 Subject: [PATCH] Update: 2026-05-06 03:13:03 --- app/Services/WhatsAppProxyService.php | 8 ++++---- app/modules_app/auth/mobile_request_otp.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Services/WhatsAppProxyService.php b/app/Services/WhatsAppProxyService.php index 406ecbd..580fdb8 100644 --- a/app/Services/WhatsAppProxyService.php +++ b/app/Services/WhatsAppProxyService.php @@ -16,7 +16,8 @@ class WhatsAppProxyService //"https://botmasa.intaleq.xyz/send", // mayar //"https://botmasa2.intaleq.xyz/send", // shad //"https://bootride.intaleq.xyz/send", // ramat bus - "https://bot5.intaleq.xyz/send", // shahd + "https://bot3.intaleq.xyz/send", // shahd + "https://bot5.intaleq.xyz/send", // bot5 from postman //"https://whatsapp.tripz-egypt.com/send" // tripz ]; @@ -67,9 +68,8 @@ class WhatsAppProxyService $responseData = json_decode($response, true); - // التحقق من حالة الرد (يمكنك تخصيصه حسب هيكل رد البوت الخاص بك) - if (isset($responseData['error']) && $responseData['error']) { - error_log("[WhatsAppProxyService] API Error on $url: " . json_encode($responseData)); + if (!isset($responseData['success']) || $responseData['success'] !== true) { + error_log("[WhatsAppProxyService] API Error on $url: " . $response); return false; } diff --git a/app/modules_app/auth/mobile_request_otp.php b/app/modules_app/auth/mobile_request_otp.php index ca41dea..1616574 100644 --- a/app/modules_app/auth/mobile_request_otp.php +++ b/app/modules_app/auth/mobile_request_otp.php @@ -82,8 +82,8 @@ $message = "رمز التحقق لتطبيق مُصادَق:\n*{$otp}*\n\nصال $smsSent = $whatsappService->sendMessage($phone, $message); if (!$smsSent) { - error_log("WARN: Failed to send OTP WhatsApp to phone hash: {$phoneHash}"); - // Still return success to not reveal info, but log the issue + error_log("ERROR: Failed to send OTP WhatsApp to phone: {$phone}"); + json_error('عذراً، فشل في إرسال رمز التحقق. الرجاء التأكد من صحة رقم الواتساب الخاص بك والمحاولة مرة أخرى.', 500); } // Log for development (REMOVE IN PRODUCTION!)