Cart::checkoutSession() now inspects each line's price type and selects the session mode automatically: `subscription` when the cart carries any recurring price, `payment` otherwise. Recurring lines reuse a synced Stripe Price (stripe_price_id) when present and fall back to dynamic price_data with a `recurring` block otherwise; quarterly cadence maps to a 3-month interval since Stripe has no native quarter. The cart id is propagated via subscription_data metadata for webhook mapping. Mixing recurring and one-time prices in one cart throws the new MixedCheckoutModeException, since a Stripe Checkout session is single-mode. The recurring resolver tolerates both the package's enum-cast price model and a host model storing type/interval as plain strings, so it keeps working when shop.models.product_price is overridden. |
||
|---|---|---|
| .. | ||
| Feature | ||
| Unit | ||
| TestCase.php | ||
| bootstrap.php | ||