@extends('layouts.layout-2') @section('content')
Erstbestellung Abo (realistisch): Zuerst legt der Checkout das Abo an
(CheckoutController → AboHelper::createNewAbo), danach meldet Payone per
POST {{ route('api.payment_status', [], true) }} den Zahlungsstatus – dann laufen u. a.
Payment::paymentStatusPaidAction, Abo-Freischaltung (setAboActive) und
IncentiveTracker::trackAboActivated. Die Testbench-Schritte sind in dieser Reihenfolge angeordnet.
Nur außerhalb Production.
{{ $fixture['shopping_order_id'] }}{{ $fixture['shopping_payment_id'] }}{{ $fixture['reference'] }}{{ $fixture['amount_cents'] }} (=
{{ number_format($fixture['amount_eur'], 2, ',', '.') }} €){{ $fixture['consultant_user_id'] ?? '–' }}2. Checkout-Erfolg (nur Abo)
Wie handleSuccessfulTransaction / transactionApproved:
AboHelper::createNewAbo($ShoppingPayment) – legt UserAbo + UserAboOrder an.
Ohne vorherige payment_transactions wird eine Minimal-Transaktion angelegt.
Nicht-Abo – Schritt entfällt.
@endif3. Payone-API: Zahlung bestätigt (paid)
Api\PayoneController::paymentStatus → Payment::paymentStatusPaidAction
(Abo freischalten, Incentive, …). Bei Abo-Erstbestellung nur nach Schritt 2 (sonst Fehlermeldung).
4. Abo-Verlängerung (wie user:make_abo_order / Cron)
Setzt next_date auf heute, entfernt ggf. heutige user_abo_orders (Test-Wiederholung),
führt dann UserMakeAboOrder::makeOrder aus (neue Bestellung + Payone). Anschließend Incentive-Zähler
(z. B. qualifizierte Abos) und Umsatzpunkte prüfen – für Rechnung/SV wie in Produktion Schritt 5.
5. Payone-API: Verlängerung bestätigt (paid)
Wie Server-zu-Server-Callback nach Cron-Zahlung: Payment::paymentStatusPaidAction (Rechnung,
createAndSalesVolume → IncentiveTracker::trackSalesVolume, …).
Manuell (z. B. Postman / curl)
{{ $fixture['curl'] }}
{{ $simulateResult['hint'] }}
@endif{{ $simulateResult['http_status'] }}{{ $simulateResult['body'] }} (Payone
erwartet TSOK){{ $simulateResult['order_txaction'] ?? 'null' }}Gesendeter Payload
{{ json_encode($simulateResult['payload'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
{{ $checkoutSuccess['user_abo_id'] ?? '–' }}{{ $checkoutSuccess['user_abo_order_id'] ?? '–' }}{{ $checkoutSuccess['shopping_order_id'] ?? '–' }}{{ $checkoutSuccess['hint'] }}
@endif{{ $cronRenewal['shopping_order_id'] }}{{ $cronRenewal['user_abo_id'] }}{{ json_encode($cronRenewal['diagnosis'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
{{ $cronRenewal['hint'] }}
@endif