This commit is contained in:
2026-02-06 13:26:38 +01:00
parent 73968dfbd6
commit 44a88dcfad
2 changed files with 31 additions and 28 deletions

View File

@@ -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']) {