ProveProof
Gate G3: honor period and reauthorize
How long an authorization stays capturable, and whether reauthorize extends it. In progress, with a simulation beside it.
G3 IN PROGRESS
Question
How long does a PayPal authorization stay capturable, and does reauthorize extend it? This decides how long an auction may run between a bid (a hold) and the hammer (the capture).
Status
Method
- Workflow:
gate-g3. A manual run onmainstarts the probe (day 0: a headless browser signs in as the sandbox buyer and approves four orders). It also runs on a schedule, every 6 hours, to pick the probe up again and do the checks at each checkpoint. The last run appends the entry todocs/GATES.md. - Scripts:
gates/g3.tsandgates/g3-timed.tsinpackages/payments. - Early reading:
gate-g3-earlyprobes two older G2 authorizations (a 1.00 partial capture and a reauthorization once an authorization reaches its checkpoint age, 3.0 days for the wallet one and 3.5 for the card one). It never touches the G3 probe state. It is an extra early reading, not the full 5-day result. - Secrets by name:
PAYPAL_CLIENT_ID,PAYPAL_CLIENT_SECRET,SANDBOX_BUYER_EMAIL,SANDBOX_BUYER_PASSWORD.
What the nightly run said so far
The nightly spec R3 (reauthorize after a delay) answered HTTP 422 UNPROCESSABLE_ENTITY and reported inconclusive. Reauthorize is therefore unproven on that run. See the nightly record.
Simulated, not real
| Scenario | Title | Checks | Result |
|---|---|---|---|
| S1 | Hold at day 0, capture at day 1 | 6/6 | SIMULATED PASS |
| S2 | Auction closes at day 2.5, capture before the honor period ends | 6/6 | SIMULATED PASS |
| S3 | Capture at day 3.5, after the honor period, with reauthorization | 8/8 | SIMULATED PASS |
| S4 | Capture at day 5 after reauthorization at day 3 | 5/5 | SIMULATED PASS |
| S5 | Hold never reauthorized, capture at day 30 | 6/6 | SIMULATED PASS |
| S6 | Server crash and restart between hold and capture at day 2 | 10/10 | SIMULATED PASS |
| S7 | Webhook for an expired authorization arriving late | 5/5 | SIMULATED PASS |
| S8 | 30 simulated days, 100 bidders, random crashes | 7/7 | SIMULATED PASS |
Limits
- No result yet; nothing here may be quoted as a pass.
- It uses PayPal-account sandbox orders created by the probe, not a deployed auction.
- The expected failure modes it will confirm or correct are listed in the simulation file: whether a capture after 3 days still works, the exact error name, whether reauthorize inside the honor period is refused, whether it returns a new id, and whether PayPal sends a webhook on expiry.
What changes the decision
- A validity window shorter than the longest planned auction, or reauthorize that does not extend it: auctions are capped to the window and the demo stays short, or long auctions become no-go.
- A window that covers the planned auctions: go for card and wallet.
- Fallback in the meantime: keep auctions shorter than the validity window and reauthorize before the hammer. That is a plan, not a result.
- .github/workflows/gate-g3.ymlthe timed probe
- .github/workflows/gate-g3-early.ymlthe early reading
- packages/payments/gates/g3-timed.tscheckpoint logic
- docs/evidence/SIM/SIM-MULTIDAY.mdthe simulated 30 days
Edit on GitHub
Last updated on