Update: 2026-08-06 18:32:03
This commit is contained in:
@@ -100,14 +100,12 @@ try {
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
// 5. Send OTP via WhatsApp Proxy
|
||||
$whatsappService = new \App\Services\WhatsAppProxyService();
|
||||
$message = "رمز التحقق لتطبيق مُصادَق:\n*{$otp}*\n\nصالح لمدة 5 دقائق.";
|
||||
$result = $whatsappService->sendMessage($phone, $message);
|
||||
// 5. Send OTP via the configured channel (Nabeh gateway or WhatsApp bots)
|
||||
$result = \App\Services\OtpSender::sendOtp($phone, $otp);
|
||||
|
||||
if (!$result['success']) {
|
||||
// Internal provider details stay in the log, not in the HTTP response.
|
||||
error_log("ERROR: Failed to send OTP WhatsApp to phone: {$phone} - " . json_encode($result));
|
||||
error_log("ERROR: Failed to send OTP to phone: {$phone} - " . json_encode($result));
|
||||
json_error('عذراً، فشل في إرسال رمز التحقق. الرجاء التأكد من صحة رقم الواتساب الخاص بك والمحاولة مرة أخرى.', 500);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user