Skip to content

DRAFT: checkout, success, cancel and resend pages (test mode, config off) - #184

Draft
fosterstack-admin wants to merge 5 commits into
mainfrom
www/checkout-pages
Draft

fosterstack-admin wants to merge 5 commits into
mainfrom
www/checkout-pages

Conversation

@fosterstack-admin

@fosterstack-admin fosterstack-admin commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

HOLD (owner, Oct 26: "I am not ready for a buy page to go live."): this PR stays DRAFT. No ready mark, no merge and no allowlist or exception-list edit, whatever the checks say, until the owner's explicit go in the advisor's conversation.

DRAFT. Test mode only. Config is OFF: no buy button is active, no page makes a request, until the owner's apply gives the three addresses.

Builds the www side of payments SB-10.2 (checkout), SB-10.4 (cancel), SB-10.5 (success), SB-10.6 (resend). Base: www#33's shells, moved to /checkout/success/ and /checkout/cancel/ to match the Terraform success and cancel URLs.

  • /buy/, /checkout/success/, /checkout/cancel/, /resend-key/; checkout.js (one same-origin file, no inline script); checkout-config.js (enabled:false).
  • Sends only: {product:"cache",tier,interval} + Idempotency-Key to the checkout address; one GET /v1/entitlement?s= from the success page (one more only on "Check again"); {email} from the resend page. No cookie, no storage, no console, values inserted as text, the Stripe URL followed only on https://checkout.stripe.com.
  • The resend page's email field is the owner's ratified exception to "no form on www" (SB-10.6, revised Q9). No other page has an email field (test test_wb_11_...).
  • Copy: the ratified renewal lines and the ratified resend sentence are exact; everything else is marked TODO-COPY for the owner.
  • Tests: node --test tests/ (22, written first).

Known red: the file-allowlist hygiene check fails on exactly these four paths. The change is the owner's to make; nobody edits bin/check-file-allowlist.sh until he says so. The four lines:

  '^checkout\.js$'
  '^checkout-config\.js$'
  '^tests/checkout\.test\.js$'
  '^checkout/(success|cancel)/index\.html$'

Not in this PR (held): the _headers CSP connect-src edit (exactly the three backend origins, no wildcard) and the hygiene-workflow step that runs the node tests; both ride with the real addresses after the apply (read-back approved by the advisor). The WB-1..19 ACs are unratified drafts, so this does not merge until the owner ratifies them.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Deploying www with  Cloudflare Pages  Cloudflare Pages

Latest commit: f37a498
Status: ✅  Deploy successful!
Preview URL: https://981e35fb.www-4rw.pages.dev
Branch Preview URL: https://www-checkout-pages.www-4rw.pages.dev

View logs

@fosterstack-admin

Copy link
Copy Markdown
Contributor Author

The file-allowlist check (bin/check-file-allowlist.sh) is red on exactly four paths of this PR. The edit to that guard was refused to me, so here is the exact change, for whoever the owner names to apply it (it adds four exact patterns before the .github/workflows line of ALLOW_PATTERNS; nothing else changes):

   '^bin/test-live-check\.sh$'
+  '^checkout\.js$'
+  '^checkout-config\.js$'
+  '^tests/checkout\.test\.js$'
+  '^checkout/(success|cancel)/index\.html$'
   '^\.github/workflows/[A-Za-z0-9_-][A-Za-z0-9._-]*\.ya?ml$'

(The line '^[A-Za-z0-9._-]+/index\.html$' already allows /buy/ and /resend-key/; the two-level checkout paths and the three new files are the four that fail.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants