feat(checkout): choose automatic renewal or a one-time yearly Swish payment #301
Inga granskare
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-web!301
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/296-renewal-choice"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Customers choose between automatic renewal by card and a one-time yearly Swish payment, at the same price.
renewal=none) and "Pay with card: renews automatically" (renewal=auto). Without JS, CSS:has()hides the Swish button for Monthly, and the server refuses monthly Swish./checkout/return(and/en/) works without a session, because a Swish app switch often returns in another browser. The checkout builds an AES-256-GCM token (key derived fromSESSION_SECRETwith HKDF under its own label) holding the username and when it was made. The page rejects a forged or 7-day-old token, callssubscriptionStatusserver-side, and shows only the outcome plus the paid-until date when paid. A charge older than the token is ignored. Then a separate sign-in prompt. Headers:no-referrer,private, no-store,noindex; no analytics script on that page; not in the sitemap.already_subscribed,payment_pendingandone_time_needs_annualeach get their own message.Not included: a "Switch to automatic renewal" button. The billing service refuses an auto checkout while a one-time year runs, so the page shows a hint near the end of the year instead.
Tests: 579 passed; build passes. Version 1.21.0.
Closes #296.