feat(checkout): show and record consent to automatic renewal #327

Sammanfogat
supernaut sammanfogade 2 incheckningar från feat/renewal-consent in i main 2026-10-09 13:17:04 +00:00
Ägare

Closes #309.

What

  • Checkout with automatic renewal shows one consent sentence above the pay buttons: price, interval, renews until cancelled, how to cancel. Swedish and English. CSS shows the sentence for the selected interval, so it works without JavaScript.
  • beginCheckout rebuilds the sentence on the server with the same renewalConsentText(lang, interval) the page renders, and sends consent { text, language, shownAt } to startCheckout. One-time Swish sends none.
  • consentShownAt is set at render time. The server refuses a missing value, one more than 60 s in the future or older than 24 h, with a new stale status ("reload the page").
  • The terms (sv and en) give the same deadline: the working day before the renewal date. Last updated 2026-10-09.
  • Version 1.26.0.

Copy

  • SV: "Jag godkänner att Bitborg debiterar mitt kort {price} och förnyar abonnemanget automatiskt tills jag säger upp det, vilket jag gör genom att mejla {email} senast arbetsdagen före förnyelsedagen."
  • EN: "I agree that Bitborg charges my card {price} and renews my subscription automatically until I cancel it, which I do by emailing {email} no later than the working day before the renewal date."

Tests

Sent text equals renewalConsentText for sv and en, annual and monthly. No consent for Swish. Missing, garbage, future and too-old shown times are refused. 609 unit tests pass, build and e2e pass.

Known limits: browsers without :has() show the annual sentence after a switch to monthly. shownAt is client-supplied and only range-checked.

Closes #309. ## What - Checkout with automatic renewal shows one consent sentence above the pay buttons: price, interval, renews until cancelled, how to cancel. Swedish and English. CSS shows the sentence for the selected interval, so it works without JavaScript. - `beginCheckout` rebuilds the sentence on the server with the same `renewalConsentText(lang, interval)` the page renders, and sends `consent { text, language, shownAt }` to `startCheckout`. One-time Swish sends none. - `consentShownAt` is set at render time. The server refuses a missing value, one more than 60 s in the future or older than 24 h, with a new `stale` status ("reload the page"). - The terms (sv and en) give the same deadline: the working day before the renewal date. Last updated 2026-10-09. - Version 1.26.0. ## Copy - SV: "Jag godkänner att Bitborg debiterar mitt kort {price} och förnyar abonnemanget automatiskt tills jag säger upp det, vilket jag gör genom att mejla {email} senast arbetsdagen före förnyelsedagen." - EN: "I agree that Bitborg charges my card {price} and renews my subscription automatically until I cancel it, which I do by emailing {email} no later than the working day before the renewal date." ## Tests Sent text equals `renewalConsentText` for sv and en, annual and monthly. No consent for Swish. Missing, garbage, future and too-old shown times are refused. 609 unit tests pass, build and e2e pass. Known limits: browsers without `:has()` show the annual sentence after a switch to monthly. `shownAt` is client-supplied and only range-checked.
supernaut lade till 1 incheckning 2026-10-09 13:01:59 +00:00
feat(checkout): show and record consent to automatic renewal
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m59s
5f1952c654
Closes #309
supernaut lade till 1 incheckning 2026-10-09 13:13:05 +00:00
fix(checkout): cancel by the working day before renewal
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m47s
ca4dbd1fee
The consent sentence and the terms now give the same deadline. Refs #309
supernaut sammanfogade incheckning c01b015cb8 till main 2026-10-09 13:17:04 +00:00
supernaut tog bort grenen feat/renewal-consent 2026-10-09 13:17:04 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!327
Ingen beskrivning angiven.