$token, 'secret_key' => $secretKey, 'ignore_enabled' => true, ]); if (!empty($result['success'])) { set_flash('success', tr('تم إرسال رسالة الاختبار إلى 968 ', 'Test message sent to 968 ') . $phone . '.'); } else { $status = isset($result['status']) ? (' (' . (int) $result['status'] . ')') : ''; set_flash('danger', tr('فشل إرسال رسالة الاختبار.', 'Failed to send the test message.') . ' ' . (string) ($result['error'] ?? ('Wablas error' . $status))); } header('Location: ' . ($_SERVER['HTTP_REFERER'] ?? '../index.php')); exit;