Commit Graph

2 Commits

Author SHA1 Message Date
Fabian @ Blax Software 6aae653dac fix(stripe): safe return from Checkout, retries and duplicate events
- checkoutSession() keeps pending purchases in step with the cart: a buyer
  who cancels on Stripe and edits the cart pays for (and is invoiced) the
  cart as it is, not the first attempt.
- checkout.session.completed is idempotent and locked per payment: a
  redelivered event, a concurrent charge.succeeded or the success page
  record the payment once. An unpaid (async) session creates the order but
  records no payment until Stripe settles it.
- New StripeCheckoutConfirmation + WS cart.confirm {session_id}: the
  success page settles a paid session through the webhook's code path, so
  the order exists the moment the buyer is back.
- CartService::guest() never hands a converted cart back to its session.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:03:38 +02:00
Fabian @ Blax Software b4125c1ee1 feat(i18n,stripe): de/pl translations + order address snapshots from Checkout Session
- lang/de and lang/pl for cart.php and auth.php (informal register), every
  key of lang/en translated; README documents the `shop::` namespace and
  the lang/vendor/shop/<locale>/ override path.
- StripeWebhookController::handleCheckoutSessionCompleted now persists the
  session's customer_details as Order.billing_address and shipping_details
  as Order.shipping_address (falls back to billing when Stripe sent no
  shipping block). Snapshot shape: name, email, phone, line1, line2,
  postal_code, city, state, country, uid (first tax id). Only empty columns
  are filled; a session without either block leaves the order untouched.
  Optional host-added customer_email/customer_name columns are filled when
  present and empty. Accepts Stripe objects, stdClass and arrays.
- Controller formatted with pint (composer lint).

Tests: tests/Unit/Stripe/StripeWebhookAddressTest.php (5),
tests/Feature/ShopServiceProvider/TranslationsTest.php (4). Full suite
green (1477, 7 skipped).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 13:39:40 +02:00