- 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
21 lines
1.0 KiB
SQL
21 lines
1.0 KiB
SQL
-- core/payments -- Rohprotokoll in PostgreSQL (krempl_data)
|
|
-- Jede Anfrage/Antwort eines Anbieters mit Zeitstempel. Die Beweiskette.
|
|
CREATE TABLE IF NOT EXISTS payment_log (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
provider TEXT NOT NULL,
|
|
action TEXT NOT NULL, -- start, create, capture, get, webhook, mail, cancel, mismatch
|
|
order_id INTEGER,
|
|
order_number TEXT,
|
|
reference TEXT, -- ID beim Anbieter
|
|
status TEXT,
|
|
http_status INTEGER,
|
|
payload JSONB,
|
|
detail TEXT,
|
|
host TEXT, -- dev.intelectra.de / intelectra-shop.de
|
|
zeitpunkt TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
CREATE INDEX IF NOT EXISTS idx_payment_log_order ON payment_log (order_id);
|
|
CREATE INDEX IF NOT EXISTS idx_payment_log_reference ON payment_log (reference);
|
|
CREATE INDEX IF NOT EXISTS idx_payment_log_zeit ON payment_log (zeitpunkt);
|
|
CREATE INDEX IF NOT EXISTS idx_payment_log_provider ON payment_log (provider, action, zeitpunkt);
|