feat: payment success/cancel pages on registration form #53

Closed
opened 2026-03-19 01:41:26 +00:00 by forgejo_admin · 0 comments

Type

Feature

Lineage

plan-wkq → Phase 5 (SPA Payment Success/Cancel Pages)

Repo

forgejo_admin/westside-app

User Story

As a parent returning from Stripe checkout
I want to see a clear success or cancel message
So that I know whether my payment went through and what to do next

Context

After Phase 4 (dynamic Stripe Checkout Sessions), the Stripe checkout redirects back to /register?payment=success or /register?payment=cancelled. The SPA needs to handle these query params and show appropriate messaging instead of the registration form.

File Targets

Files to modify:

  • src/routes/register/+page.svelte — handle ?payment=success and ?payment=cancelled query params

Files NOT to touch:

  • Other routes
  • API code

Acceptance Criteria

  • ?payment=success shows: "Payment received! Your account is being created. Check your email for login credentials."
  • ?payment=cancelled shows: "Payment was cancelled. You can try again below." with link back to registration form
  • Normal /register (no query param) shows the registration form as before
  • Success page has no form — just the confirmation message
  • Cancel page lets user retry

Test Expectations

  • Manual: visit /register?payment=success shows success message
  • Manual: visit /register?payment=cancelled shows cancel message with retry link
  • Manual: visit /register shows normal form

Constraints

  • SvelteKit static adapter — use $page.url.searchParams for query param detection
  • Match existing site design/colors
  • Keep it simple — no animations or complex state

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • westside-basketball — project
  • Depends on basketball-api #112 (Phase 4) for the redirect URLs
### Type Feature ### Lineage `plan-wkq` → Phase 5 (SPA Payment Success/Cancel Pages) ### Repo `forgejo_admin/westside-app` ### User Story As a parent returning from Stripe checkout I want to see a clear success or cancel message So that I know whether my payment went through and what to do next ### Context After Phase 4 (dynamic Stripe Checkout Sessions), the Stripe checkout redirects back to `/register?payment=success` or `/register?payment=cancelled`. The SPA needs to handle these query params and show appropriate messaging instead of the registration form. ### File Targets Files to modify: - `src/routes/register/+page.svelte` — handle `?payment=success` and `?payment=cancelled` query params Files NOT to touch: - Other routes - API code ### Acceptance Criteria - [ ] `?payment=success` shows: "Payment received! Your account is being created. Check your email for login credentials." - [ ] `?payment=cancelled` shows: "Payment was cancelled. You can try again below." with link back to registration form - [ ] Normal `/register` (no query param) shows the registration form as before - [ ] Success page has no form — just the confirmation message - [ ] Cancel page lets user retry ### Test Expectations - [ ] Manual: visit `/register?payment=success` shows success message - [ ] Manual: visit `/register?payment=cancelled` shows cancel message with retry link - [ ] Manual: visit `/register` shows normal form ### Constraints - SvelteKit static adapter — use `$page.url.searchParams` for query param detection - Match existing site design/colors - Keep it simple — no animations or complex state ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `westside-basketball` — project - Depends on basketball-api #112 (Phase 4) for the redirect URLs
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-landing#53
No description provided.