laravel-shop/tests/Feature/Ledger
Fabian @ Blax Software 8aa727fb5e fix(ledger): count PayPal payments at their charge amount
PayPal pays into the merchant's PayPal balance, so Stripe's balance
transaction for it has amount 0 and only the fee. The ledger copied that
0, so every PayPal buyer showed no revenue. When a payment or refund
balance transaction is 0 and its charge/refund says otherwise, record the
charge's gross (net = gross - fee) and keep Stripe's own figures in meta.

syncLedgerForCharge also accepts py_ charge ids now, so PayPal payments
reach the ledger from the webhook instead of only the daily import.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 10:52:32 +02:00
..
LedgerMetricsTest.php fix(ledger): count PayPal payments at their charge amount 2026-09-27 10:52:32 +02:00