feat(contract): require consent for auto-renew checkouts #170
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-payment!170
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/auto-renew-consent"
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?
Closes #119
What
StartCheckoutInputSchemanow refuses:renewalother than"none"(including omitted, which means"auto") withoutconsent.startImmediatelyRequestedAtmore than 5 minutes in the future or more than 1 day old.Contract version bumped to 0.12.0 (minor). The service version is unchanged.
Compatibility
The current portal already sends
consentfor every auto-renew checkout and setsstartImmediatelyRequestedAtto the request time. It accepts no auto-renew choice without a fresh consent. No portal change is needed to keep checkout working.Tests
Contract tests cover missing and present consent for
auto, omitted andnone, and the time bounds at the edges. Existing fixtures use fake timers or the current time. The server test sendsrenewal: "none"and a current timestamp, since input validation runs before the disabled-payments check.Notes
@bitborg/payment-contractto 0.12.0 when they next update.ea5e17f1d3f771fb9248