CluPilotCloud/app/Services/Stripe
nexxo 60e93aafd7 Put in the key everything the call actually sends
A key says "I already sent this call", not "this is what the object is". The
catalogue calls sent metadata that the key knew nothing about, so adding the
tax_treatment field in 9da1358 poisoned yesterday's key for a day — and
AddonPrices::ensure() runs inside a customer's module booking, not only in the
sweep.

createPrice and createProduct now fold a fingerprint of their parameters into
the key. refund, cancelSubscription, addSubscriptionItem and the checkout
deliberately do not: there a second object is the customer's money taken twice,
and Stripe's refusal is the thing worth keeping.

The fake could not see any of this. Its ledger replayed the first id for a
repeated key without ever comparing what the second call asked for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 10:30:32 +02:00
..
FakeStripeClient.php Put in the key everything the call actually sends 2026-07-30 10:30:32 +02:00
HttpStripeClient.php Put in the key everything the call actually sends 2026-07-30 10:30:32 +02:00
IdempotencyKey.php Put in the key everything the call actually sends 2026-07-30 10:30:32 +02:00
StripeCheck.php Manage the Stripe key from the console, behind a password and a test 2026-07-27 09:01:16 +02:00
StripeClient.php Stop charging VAT to the customers who owe us none 2026-07-30 02:15:41 +02:00