This commit is contained in:
2026-02-06 10:36:08 +01:00
parent e23524b6bd
commit 967ffbb563
4 changed files with 98 additions and 146 deletions

View File

@@ -45,7 +45,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
// Environment
define('USE_PRODUCTION', true); // Use production webhook for live server
define('DEBUG_MODE', false); // Disable debug for production
define('DEBUG_MODE', true); // Enable debug temporarily to see errors
// N8N Webhooks
define('WEBHOOK_TEST', 'https://n8n.profice.de/webhook-test/d94ef798-3f43-46dd-8207-1e335e64518f');
@@ -193,18 +193,20 @@ function sendToWebhook($data, $webhookUrl = null) {
'User-Agent: Profice-Web-API/2.0'
],
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => !DEBUG_MODE, // Disable for debugging
CURLOPT_SSL_VERIFYPEER => false, // Disable SSL verification for n8n connection
CURLOPT_SSL_VERIFYHOST => false, // Disable host verification
CURLOPT_FOLLOWLOCATION => true
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
$errno = curl_errno($ch);
curl_close($ch);
if ($error) {
error_log("Webhook Error: " . $error);
return ['success' => false, 'error' => $error, 'response' => $response];
error_log("Webhook Error [$errno]: " . $error . " - URL: " . $url);
return ['success' => false, 'error' => $error, 'errno' => $errno, 'response' => $response];
}
return [