→ Token validieren, Widerrufs-Formular anzeigen * POST → Widerruf erfassen, Bestätigungsseite anzeigen * * Standalone-Entry-Point, nutzt das Shop-Base-Objekt für DB + Config. * * @copyright Wlanium / Thomas Bartelt * @since 2026-04-19 */ session_start(); ini_set('display_errors', 0); error_reporting(0); ini_set('log_errors', 1); ini_set('error_log', __DIR__.'/error_log.txt'); header('X-Robots-Tag: noindex, nofollow', true); header('Content-Security-Policy: default-src \'self\'; style-src \'unsafe-inline\''); include_once './core/base.class.php'; include_once './core/registry.class.php'; $base_object = new base(); Registry::set('base', $base_object); include_once './core/revocation.class.php'; $revocation = new Revocation($base_object); $view = 'form'; $payload = null; $error = null; // ------------------------------------------------------------ // Request dispatch // ------------------------------------------------------------ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $token = isset($_POST['t']) ? (string)$_POST['t'] : ''; $reason_id = isset($_POST['reason_id']) ? (int)$_POST['reason_id'] : 0; $reason_text = isset($_POST['reason_text']) ? (string)$_POST['reason_text'] : ''; $confirm = isset($_POST['confirm']) && $_POST['confirm'] === '1'; if (!$confirm) { // Zweite Stufe nicht aktiv bestätigt → zurück zum Form mit Hinweis $payload = $revocation->validate_token($token); if ($payload) { $view = 'form'; $error = 'Bitte bestätigen Sie den Widerruf durch Setzen des Hakens.'; } else { $view = 'error'; $error = $revocation->get_error(); } } else { $ip = $_SERVER['REMOTE_ADDR'] ?? ''; $ua = $_SERVER['HTTP_USER_AGENT'] ?? ''; if ($revocation->submit($token, $reason_id, $reason_text, $ip, $ua)) { $view = 'success'; } else { $view = 'error'; $error = $revocation->get_error(); } } } else { $token = isset($_GET['t']) ? (string)$_GET['t'] : ''; $payload = $revocation->validate_token($token); if (!$payload) { $view = 'error'; $error = $revocation->get_error(); } } // ------------------------------------------------------------ // View rendering // ------------------------------------------------------------ $reasons = $revocation->fetch_reasons(); ?>
Gemäß § 355 BGB haben Sie das Recht, Ihren Vertrag binnen 14 Tagen ohne Angabe von Gründen zu widerrufen.
Bei Rückfragen erreichen Sie uns unter = htmlspecialchars(REVOCATION_OWNER_EMAIL) ?>.
Sie können Ihren Widerruf jederzeit auch formlos per E-Mail an = htmlspecialchars(REVOCATION_OWNER_EMAIL) ?> oder per Brief erklären.
Intelectra GmbH · Sachsenring 20 · 94315 Straubing