contract: require consent for auto-renew, bound the start-request time #119

Stängd
öppnade 2026-10-08 21:12:29 +00:00 av supernaut · 0 kommentarer
Ägare

What

Checkout evidence fields are optional or unchecked. Extends #101.

Why

consent is optional. startImmediatelyRequestedAt is any ISO datetime.

Failing case

An auto-renew checkout without consent succeeds, and the charge holds no consent evidence for a card dispute. startImmediatelyRequestedAt may be in the future or years old.

Fix

In StartCheckoutInputSchema: require consent when renewal !== "none". Refuse startImmediatelyRequestedAt later than now plus 5 minutes or older than 1 day. Contract minor bump. The portal change goes in a portal issue.

Done when

  • Auto-renew checkout without consent is rejected.
  • Out-of-range times are rejected.
  • Contract tests cover both.
## What Checkout evidence fields are optional or unchecked. Extends #101. ## Why `consent` is optional. `startImmediatelyRequestedAt` is any ISO datetime. ## Failing case An auto-renew checkout without `consent` succeeds, and the charge holds no consent evidence for a card dispute. `startImmediatelyRequestedAt` may be in the future or years old. ## Fix In `StartCheckoutInputSchema`: require `consent` when `renewal !== "none"`. Refuse `startImmediatelyRequestedAt` later than now plus 5 minutes or older than 1 day. Contract minor bump. The portal change goes in a portal issue. ## Done when - [ ] Auto-renew checkout without consent is rejected. - [ ] Out-of-range times are rejected. - [ ] Contract tests cover both.
supernaut lade till detta till projektet Bitborg Payment 2026-10-08 21:14:11 +00:00
Logga in för att delta i denna konversation.
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-payment#119
Ingen beskrivning angiven.