feat: payment success/cancel pages for Stripe redirect #54
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-landing!54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "53-feat-payment-success-cancel-pages-on-reg"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Handle
?payment=successand?payment=cancelledquery params on the registration page so users see a clear confirmation or cancellation message after Stripe checkout redirects back, instead of the raw registration form.Changes
src/routes/register/+page.svelte— Added$pagestore import and$derivedreactive variable to detectpaymentquery param. Wrapped existing form/confirmation in a three-way conditional: success view, cancelled view, or normal form. Success view reuses existing.confirmation-icon,.next-steps, and.dues-notestyles. Cancelled view shows a clear message with "Try Again" and "Back to Home" actions.src/app.css— Added.payment-result,.payment-cancelled-icon, and.payment-result-actionsstyles. Cancelled icon uses yellow theme (matching the existing warning palette). Layout is centered, max-width 480px, mobile-friendly.Test Plan
/register— normal registration form displays as before (no regression)/register?payment=success— shows "Payment Received!" confirmation with next steps and "Back to Home" link/register?payment=cancelled— shows "Payment Cancelled" message with "Try Again" (links to/register) and "Back to Home" buttonsnpm run buildpasses with static adapterReview Checklist
$derivedrune (not legacy$:)Related
PR Review — #54
Scope check
Changes match issue #53 exactly: two files modified, 91 additions, 0 deletions. No scope creep.
Findings
Svelte 5 correctness —
$derived($page.url.searchParams.get('payment'))is correct rune syntax, consistent with the rest of the file using$stateand$derived. No legacy$:syntax.Static SPA compliance — No server-side code.
$pagefrom$app/storesworks with the static adapter.Template structure — Three-way conditional (success / cancelled / else-form) is clean. Both
{/if}closers are present and correctly paired.Style reuse — Success view reuses existing
.confirmation-icon,.confirmation-title,.confirmation-subtitle,.next-steps,.dues-noteclasses from app.css. No style duplication.CSS quality — New styles use existing custom properties (
--color-yellow-bg,--color-yellow-border,--color-yellow). Green for success (via existing.confirmation-icon), yellow for cancelled. Centered layout withmax-width: 480px."Try Again" flow — Cancelled page links to
/register(clean URL, no query params), which resets to the empty form. The copy "Your registration is saved" is accurate because the API persists the registration before returning the Striperedirect_url(lines 126-148 in the original file).No regressions — Existing form and confirmation flow are untouched, just wrapped in
{:else}. Progress bar and header correctly hidden on success/cancelled views.Build —
npm run buildpasses cleanly with static adapter.Nits
None.
VERDICT: APPROVE — Clean, minimal implementation. Correct Svelte 5 patterns, reuses existing styles, no regressions.