Update: 2026-05-06 03:16:32
This commit is contained in:
@@ -79,11 +79,11 @@ if ($fp) {
|
||||
// 5. Send OTP via WhatsApp Proxy
|
||||
$whatsappService = new \App\Services\WhatsAppProxyService();
|
||||
$message = "رمز التحقق لتطبيق مُصادَق:\n*{$otp}*\n\nصالح لمدة 5 دقائق.";
|
||||
$smsSent = $whatsappService->sendMessage($phone, $message);
|
||||
$result = $whatsappService->sendMessage($phone, $message);
|
||||
|
||||
if (!$smsSent) {
|
||||
if (!$result['success']) {
|
||||
error_log("ERROR: Failed to send OTP WhatsApp to phone: {$phone}");
|
||||
json_error('عذراً، فشل في إرسال رمز التحقق. الرجاء التأكد من صحة رقم الواتساب الخاص بك والمحاولة مرة أخرى.', 500);
|
||||
json_error('عذراً، فشل في إرسال رمز التحقق. الرجاء التأكد من صحة رقم الواتساب الخاص بك والمحاولة مرة أخرى.', 500, ['whatsapp_debug' => $result]);
|
||||
}
|
||||
|
||||
// Log for development (REMOVE IN PRODUCTION!)
|
||||
@@ -91,7 +91,7 @@ if (env('APP_DEBUG', 'false') === 'true') {
|
||||
error_log("DEV OTP for {$phone}: {$otp}");
|
||||
}
|
||||
|
||||
json_success(null, 'إذا كان الرقم مسجلاً، سيتم إرسال رمز التحقق عبر واتساب');
|
||||
json_success(['whatsapp_debug' => $result], 'إذا كان الرقم مسجلاً، سيتم إرسال رمز التحقق عبر واتساب');
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user