5
This commit is contained in:
@@ -480,8 +480,8 @@ function handleContactForm($data) {
|
||||
// Store lead locally first
|
||||
$leadId = storeLead($formData);
|
||||
|
||||
// Send to webhook
|
||||
$webhookResult = sendToWebhook($formData);
|
||||
// Send to Offer webhook (contact form)
|
||||
$webhookResult = sendToWebhook($formData, WEBHOOK_URL);
|
||||
|
||||
// Always return success to user, but include webhook info in debug mode
|
||||
$debugData = DEBUG_MODE ? [
|
||||
@@ -551,13 +551,13 @@ function handleChatMessage($data) {
|
||||
'user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? ''
|
||||
];
|
||||
|
||||
// Send to webhook
|
||||
$webhookResult = sendToWebhook($chatData);
|
||||
// Send to KI Chat webhook
|
||||
$webhookResult = sendToWebhook($chatData, KI_CHAT_WEBHOOK_URL);
|
||||
|
||||
$debugData = DEBUG_MODE ? [
|
||||
'session_id' => $sessionId,
|
||||
'webhook_result' => $webhookResult,
|
||||
'webhook_url' => WEBHOOK_URL
|
||||
'webhook_url' => KI_CHAT_WEBHOOK_URL
|
||||
] : null;
|
||||
|
||||
if ($webhookResult['success']) {
|
||||
|
||||
Reference in New Issue
Block a user