sync: Zahlungsstrecke, PG-Events, Fatal-Log und PayPal-v2-Blaupause vom Live-Stand 2026-09-13
Deploy to Dev / deploy (push) Successful in 1s
Deploy to Dev / deploy (push) Successful in 1s
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Standalone-Bootstrap fuer die PayPal-v2-Endpunkte (return.php, webhook.php).
|
||||
*
|
||||
* Bindet den Shop-Kern (DB + Config) ein, OHNE den normalen index.php-Router
|
||||
* und ohne das Legacy-PayPal-Modul zu beruehren.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
// Fehler nicht an den Browser ausgeben (Produktivbetrieb)
|
||||
\ini_set('display_errors', '0');
|
||||
\error_reporting(E_ALL);
|
||||
|
||||
$docroot = $_SERVER['DOCUMENT_ROOT'] ?? '';
|
||||
if ($docroot === '' || !\is_dir($docroot . '/core')) {
|
||||
// Leeres/falsches DOCUMENT_ROOT (z. B. CLI) -> aus dem Dateipfad ableiten
|
||||
$docroot = \dirname(__DIR__, 2);
|
||||
}
|
||||
|
||||
// base.class.php nutzt relative Includes (./config.inc.php etc.) -> ins Docroot wechseln
|
||||
\chdir($docroot);
|
||||
|
||||
require_once $docroot . '/core/base.class.php';
|
||||
require_once $docroot . '/core/registry.class.php';
|
||||
require_once $docroot . '/core/order.class.php';
|
||||
|
||||
require_once __DIR__ . '/Config.php';
|
||||
require_once __DIR__ . '/PayPalClient.php';
|
||||
require_once __DIR__ . '/Orders.php';
|
||||
require_once __DIR__ . '/Webhook.php';
|
||||
require_once __DIR__ . '/Gateway.php';
|
||||
|
||||
/** @var object $base_object Shop-base mit ->db (mysqli) und ->config */
|
||||
$base_object = new base();
|
||||
Registry::set('base', $base_object);
|
||||
Reference in New Issue
Block a user