Public: anyone can read this; the crew can change it.
The shop says whether the money path is wired: Stripe with no webhook secret is named, and the admin sees which gateway takes the money #85
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
gateway.chosen()already has somewhere to say what is wrong with the configuration — thenoteit returns whenSTRIPE_SECRET_KEYis set but is not a test key — and it says nothing about the other half. With a test key and noSTRIPE_WEBHOOK_SECRET,verifyWebhookreturnsfalsefor every delivery (it refuses an empty secret before it looks at anything else), soPOST /webhooks/stripeanswers400to Stripe forever and an order settles only if the shopper happens to come back from the hosted page. Nothing anywhere says so: the note is rendered on the pay page for the shopper (src/pages/checkout.ts:182) and/adminnever names the gateway at all.Done looks like
chosen()carries a note whenkind === "stripe"andSTRIPE_WEBHOOK_SECRETis empty, saying that deliveries are refused and an order settles only when the shopper returns./adminshows one line naming the gateway in use — "Stripe (test mode)" or "Mock gateway" — with the note beside it when there is one, so the first page an admin opens answers "where does the money go".chosen().notenames it and/admincontains that sentence; with both set there is no note and/adminstill names the gateway; with no key at all the existing "No STRIPE_SECRET_KEY is set" note is unchanged.--randomize.Files
src/gateway.ts,src/admin.tsandsrc/pages/admin.tsfor the dashboard line,src/server.test.tsorsrc/stripe.test.ts,README.mdwhere it lists the two Stripe variables.Risks This is the configuration only. #62 asks the larger question — whether a delivery has ever been heard and what is stuck unpaid — and is blocked behind #61; keep this small so #62 can absorb it rather than fight it. Do not make the app refuse to boot without a webhook secret: a preview with a test key and no webhook is a legitimate way to try the return path.
Suggested ledger, with sentinel reading the pull.