laravel-shop/src
Fabian @ Blax Software 423da476f5 feat(ledger): mirror PayPal accounts into the money ledger
PayPal checkouts that run through Stripe settle into our PayPal account.
Stripe's ledger row books the gross and Stripe's fee, but PayPal takes its
own fee inside the PayPal account, so net revenue was overstated.

- Ledger rows carry `provider` (stripe, paypal) and `account`; existing
  rows default to stripe.
- shop:import-paypal-ledger reads every account in shop.paypal.accounts
  through the Transaction Search API (read-only) and upserts one row per
  PayPal transaction. Stripe-originated payments and refunds add a
  `paypal_fee` row (amount 0, net -fee); payments PayPal swept on to
  Stripe are booked as `paypal_fee_passthrough`, because Stripe's fee
  already holds PayPal's. Direct PayPal sales count in full; holds,
  sweeps and withdrawals are non-revenue.
- `paypal_fee` joins the default revenue types.
- Stripe rows keep their payment intent in meta so PayPal rows find the
  buyer.
- Shop::ledgerTotalsByAccount() splits the totals per account.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 10:46:46 +02:00
..
Console/Commands feat(ledger): mirror PayPal accounts into the money ledger 2026-10-07 10:46:46 +02:00
Contracts feat(pricing): conditional prices via meta.requires + entitlement-checker resolver 2026-08-26 12:35:14 +02:00
Enums feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00
Events feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00
Exceptions feat(tax): configurable TaxService applied across every checkout path 2026-08-21 08:23:56 +02:00
Facades feat(ledger): mirror PayPal accounts into the money ledger 2026-10-07 10:46:46 +02:00
Http fix(stripe): safe return from Checkout, retries and duplicate events 2026-09-25 12:03:38 +02:00
Models feat(tax): multi-purpose vouchers are sold without VAT 2026-10-01 09:55:01 +02:00
Services feat(ledger): mirror PayPal accounts into the money ledger 2026-10-07 10:46:46 +02:00
Traits feat(pricing): percentage conditional prices + cheapest-effective resolver + authoring helper 2026-08-26 15:52:24 +02:00
Websocket/Controllers fix(ws): cart.confirm reads the cart fresh before deciding it was converted 2026-09-25 12:05:09 +02:00
ShopServiceProvider.php feat(ledger): mirror PayPal accounts into the money ledger 2026-10-07 10:46:46 +02:00