Stripe-Integration (S4, S5, S7.6): Abos, Zahlungsart ändern, Zahlarten-Kommunikation
Phase S4 – Abos über Stripe (E2E komplett im Testmodus): - Abo-/Recovery-Checkout: customer_creation=always + setup_future_usage=off_session - StripePaymentService::chargeAbo (off-session PaymentIntent, Idempotency-Key), StripeGateway, Provider-Dispatch im Abbuchungs-Cron (PAYONE-Pfad unverändert) - Webhook: Zahlungsmittel-Capture vor Paid-Pfad, 503 payment_not_yet_visible bei Cron-Transaktions-Race; Command stripe:process-pending-events (Cron-Ende + 10-min Scheduler) verarbeitet liegengebliebene Events nach - createNewAbo/advanceAboAfterRecoveryPayment Stripe-aware inkl. Race-Absicherung; Recovery-Orders nutzen advanceAboAfterRecoveryPayment (latenter PAYONE-Duplikat-Bug) - Migrationen: Stripe-Abo-Spalten auf shopping_payments; clearingtype varchar(3)→(20) inkl. Reparatur der zu 'str' gekürzten Live-Zeilen Phase S5 – Zahlungsart ändern (Scope: jede Zahlart, nicht nur Kreditkarte): - Stripe Checkout mode=setup ohne Abbuchung; PAYONE-Abos ziehen beim Wechsel auf Stripe um (Auslaufmodell §7.2) - AboPaymentMethodService: beginStripeChange/finalize/applyStripePaymentMethod (idempotent, detacht alte PM, card_changes-Log); Webhook setup_intent.succeeded als Sicherheitsnetz; Einstiege Portal/CRM/Berater-Kunden-Link flow-abhängig - Views/Mails flow-abhängig („Zahlungsweise" statt „Kreditkarte") Phase S7.6 – Zahlarten-Kommunikation: - Einheitliche Zahlarten-Logos (SVG) + wiederverwendbares Partial payment_logos; Checkout/Footer zeigen Kern-Zahlarten + „···"-Icon, /zahlungsarten komplett neu mit allen aktiven Stripe-Zahlarten (gegen Account-Konfiguration verifiziert) und Vorkasse (PAYONE); Sofort/SEPA entfernt Tests: StripeAboTest (15), StripePaymentMethodChangeTest (10), PaymentMethodsCommunicationTest (28), PaymentProviderManagerTest angepasst. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
6f21845607
commit
ce4750fd1a
68 changed files with 2856 additions and 236 deletions
|
|
@ -98,7 +98,7 @@ class CheckoutController extends Controller
|
|||
|
||||
// Stripe aktiv: keine Gateway-Zahlartenwahl im eigenen Checkout mehr —
|
||||
// nur die Stripe-Option + systeminterne Methoden (Vorkasse/Rechnung).
|
||||
$stripe_active = $this->stripeCheckoutActive($is_abo, $recovery_user_abo_id);
|
||||
$stripe_active = $this->stripeCheckoutActive();
|
||||
if ($stripe_active) {
|
||||
$payment_methods['active'] = array_intersect_key($payment_methods['active'], array_flip(['VOR', 'FNC']));
|
||||
}
|
||||
|
|
@ -192,11 +192,7 @@ class CheckoutController extends Controller
|
|||
|
||||
if (isset($data['payment_method'])) {
|
||||
if ($data['payment_method'] === 'stripe') {
|
||||
$shopping_data = Yard::instance($this->instance)->getYardExtra('shopping_data');
|
||||
abort_unless($this->stripeCheckoutActive(
|
||||
(bool) ($data['is_abo'] ?? false),
|
||||
$shopping_data['recovery_user_abo_id'] ?? null,
|
||||
), 404);
|
||||
abort_unless($this->stripeCheckoutActive(), 404);
|
||||
} else {
|
||||
$this->checkoutRepo->isPaymentsMethodsActive($data['payment_method'], $data['is_from'], $data['is_abo']);
|
||||
}
|
||||
|
|
@ -350,15 +346,12 @@ class CheckoutController extends Controller
|
|||
|
||||
/**
|
||||
* Stripe ist für diesen Checkout aktiv, wenn der Anbieter-Schalter auf
|
||||
* Stripe steht. Abo- und Recovery-Checkouts bleiben bis Phase S4 auf
|
||||
* PAYONE (Plan dev/2026-07-08-stripe/, Abgrenzung S3/S4).
|
||||
* Stripe steht. Seit Phase S4 gilt das auch für Abo- und Recovery-Checkouts:
|
||||
* Die Erstzahlung speichert das Zahlungsmittel off-session, Recovery-
|
||||
* Zahlungen ziehen das Abo auf Stripe um (Plan dev/2026-07-08-stripe/, §7.2).
|
||||
*/
|
||||
private function stripeCheckoutActive(bool $is_abo, mixed $recovery_user_abo_id): bool
|
||||
private function stripeCheckoutActive(): bool
|
||||
{
|
||||
if ($is_abo || $recovery_user_abo_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return app(PaymentProviderManager::class)->providerForNewCheckout() === PaymentProvider::Stripe;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue