chore(payments): Webhook-Rohmitschnitt nur bei logs/webhook_debug

This commit is contained in:
Thomas Bartelt
2026-09-13 21:35:26 +02:00
parent 67af646f2e
commit e4b3f5a1ea
+6 -4
View File
@@ -26,10 +26,12 @@ foreach ($_SERVER as $key => $value) {
}
}
// Letzte Zustellung roh ablegen (logs/ ist per .htaccess gesperrt) -- fuer die Fehlersuche
// an der Signaturpruefung. Enthaelt keine Zugangsdaten.
@\file_put_contents(__DIR__ . '/logs/webhook_last_' . \preg_replace('/[^a-z0-9_]/', '', $module) . '.json',
\json_encode(['time' => \date('c'), 'headers' => $headers, 'body' => $rawBody], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
// Letzte Zustellung roh ablegen -- nur wenn logs/webhook_debug existiert (Fehlersuche an
// der Signaturpruefung, 13.09.2026). logs/ ist per .htaccess gesperrt.
if (\is_file(__DIR__ . '/logs/webhook_debug')) {
@\file_put_contents(__DIR__ . '/logs/webhook_last_' . \preg_replace('/[^a-z0-9_]/', '', $module) . '.json',
\json_encode(['time' => \date('c'), 'headers' => $headers, 'body' => $rawBody], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
}
try {
$status = $provider->onWebhook($headers, $rawBody);