feat(payments): Anbieter-Gerüst core/payments mit PayPal Orders v2

- ProviderInterface/AbstractProvider: Vorgang mit Uhrzeit+Session (payment_transactions),
  Mail und Warenkorb erst nach Zahlung, idempotentes markPaid, Betragsabgleich,
  shop_event + PG payment_log
- Secrets verschluesselt (libsodium) in MySQL, Schluessel ausserhalb Docroot
- Cashdesk: ?payment_return/?payment_cancel, Pending-Riegel, zahlung_erst_spaeter()
- Backend Zahlart-Editor: Einstellungen speichern (war ohne Empfaenger), Secret-Felder
- payment_webhook.php (Standalone), cli.php (init-key, secret, reconcile, status)
- PayPal-v2-Blaupause vom Juli entfernt
This commit is contained in:
Thomas Bartelt
2026-09-13 19:51:52 +02:00
parent af81e8f63a
commit 397fb5944a
30 changed files with 2002 additions and 1104 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
/**
* Standalone-Bootstrap fuer Endpunkte OHNE Shop-Router und OHNE Session:
* payment_webhook.php (Docroot) und core/payments/cli.php.
*
* Bindet den Shop-Kern (DB + Config, Konstanten ROOT_DIR/MAIN_URL) ein und stellt
* $base_object bereit. Session wird bewusst nicht gestartet.
*/
declare(strict_types=1);
\ini_set('display_errors', '0');
\error_reporting(E_ALL);
$docroot = $_SERVER['DOCUMENT_ROOT'] ?? '';
if ($docroot === '' || !\is_dir($docroot . '/core')) {
$docroot = \dirname(__DIR__, 2);
$_SERVER['DOCUMENT_ROOT'] = $docroot;
}
\chdir($docroot);
// base.class.php nutzt relative Includes und liest config.inc.php
require_once $docroot . '/core/base.class.php';
require_once $docroot . '/core/registry.class.php';
require_once $docroot . '/core/order.class.php';
if (\is_file($docroot . '/core/postgres/shop_events.php')) {
require_once $docroot . '/core/postgres/shop_events.php';
}
require_once __DIR__ . '/Registry.php';
\Payments\Registry::requireCore();
$base_object = new base();
Registry::set('base', $base_object);