From 56e147e1c271da104ac5ad93a485f79abd8334c6 Mon Sep 17 00:00:00 2001 From: Pingu Date: Mon, 20 Jul 2026 20:35:41 +0000 Subject: [PATCH] =?UTF-8?q?Webhooks/master=5Fwebhook.php=20hinzugef=C3=BCg?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Webhooks/master_webhook.php | 152 ++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 Webhooks/master_webhook.php diff --git a/Webhooks/master_webhook.php b/Webhooks/master_webhook.php new file mode 100644 index 0000000..c09d855 --- /dev/null +++ b/Webhooks/master_webhook.php @@ -0,0 +1,152 @@ += 200 && $http_code < 300) { + logMasterDebug("Erfolgreich hochgeladen: $filename in Ordner für Template $template_id"); + + if ($submission_id) { + $ch_del = curl_init("https://docusign.fuyuzakura.de/api/v1/submissions/" . $submission_id); + curl_setopt($ch_del, CURLOPT_CUSTOMREQUEST, "DELETE"); + curl_setopt($ch_del, CURLOPT_HTTPHEADER, [ + "X-Auth-Token: " . $api_key, + "Content-Type: application/json" + ]); + curl_setopt($ch_del, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch_del); + curl_close($ch_del); + } + echo "Erfolg!"; + } else { + logMasterDebug("Nextcloud Upload Fehler. HTTP: $http_code"); + http_response_code(500); + } + } else { + logMasterDebug("Fehler beim Herunterladen der PDF von DocuSeal. HTTP-Code: $down_status"); + } +} else { + logMasterDebug("Keine PDF-URL im Payload gefunden."); +} +?> \ No newline at end of file