11 Commits
Author SHA1 Message Date
mizorewww 4cb9119dbf feat: cool declined exits before cards and expose payment status
Route X account and eligibility checks directly while regional pricing
and checkout creation share the configured proxy exit, keeping quoted
currency and amounts consistent for the customer.

A decline now cools the card×node pair and the exit's shared IP for 30
minutes first; only a card declined through two distinct nodes enters a
whole-card cooldown, and do_not_try_again blocks just that card. Card
and rotation status stay readable with no cards configured and no longer
report expired cooldowns as blocks. Links-only recovery works without a
payment card, and the recovery status endpoint reports the
payment-protection pause.
2026-10-04 14:27:26 +08:00
mizorewww 83ac3f00ae feat: add card rotation, customer lookup, and concurrent eligibility checks
Add encrypted card pool management, persisted card and outbound rotation, and per-card decline cooldowns. Improve customer and redemption-code lookup, recovery controls, and filtering; rebuild frontend assets and refresh mock screenshots.

Give read-only eligibility checks four independent slots so payment processing no longer blocks them. Cover concurrency, slot cleanup, card rotation, and lookup behavior with tests.
2026-10-04 11:44:38 +08:00
mizorewww 92f09423c3 feat: add payment node cooldown and safe network retries 2026-10-04 01:50:08 +08:00
mizorewww 7493a72941 feat: add order recovery and per-order payment proxy pools
Add customer code lookup, single-order and batch recovery, and verified replacement checkout links with preserved payment evidence.

Add payment pause controls, persisted per-order outbound selection, proxy diagnostics, admin status, documentation, tests, and rebuilt frontend assets.
2026-10-03 21:59:14 +08:00
mizorewww 2ca5a5911f fix(cli): restore functional X Premium catalog defaults
The history scrub replaced the wizard's default catalog constants
with placeholders, which would write a nonfunctional catalog for
anyone accepting the defaults. Restore X's real gifting identifiers
— they are published in x.com checkout pages, not operator secrets.
2026-10-03 13:09:37 +08:00
mizorewww b0ce2a249c feat: make the Stripe catalog operator-configurable
Move the hardcoded merchant account, product IDs, amounts and
currency into an encrypted catalog vault record read per checkout
flow. The setup wizard offers the X Premium defaults (X's public
gifting identifiers) or a fully custom catalog, put --name catalog
updates it, and status validates it. Tests use fake catalog
fixtures instead of real identifiers.
2026-10-03 12:48:46 +08:00
mizorewww f18083f33e fix(cli): support repairing api-auth and stripe-key records
put --name now accepts api-auth (JSON) and stripe-key (the raw
pk_live_ key), so status failure messages can point at a working
repair path instead of the setup wizard, which refuses an existing
vault. The wizard also prints explicit recovery instructions when it
aborts after creating the vault, and validates the site origin
exactly like the web server.
2026-10-03 12:09:38 +08:00
mizorewww 84727ded02 feat(cli): add interactive first-time setup wizard
xgift setup guides the operator through writing X cookies and API
auth metadata, the payment card with billing details, the proxy
(direct, guided AnyTLS, or pasted sing-box JSON validated by a real
embedded start), and the Stripe publishable key into a freshly
created encrypted vault, generating the vault password to a
persistent owner-only file. It can also emit site.env and a random
admin password for the web service. Secrets are read without echo on
terminals while piped stdin stays scriptable. The status command now
also verifies the api-auth and stripe-key records.
2026-10-03 11:54:45 +08:00
mizorewww 0c12c5b8d7 Archive verified canceled checkouts and prepare user redemption trial 2026-10-02 16:46:54 +08:00
mizorewww 0917e47bc0 Fix Stripe save-option rejection and persist payment diagnostics and billing address 2026-10-02 15:51:51 +08:00
mizorewww ca14496cfc Add guarded X gift CLI and paused redemption site with admin code management 2026-10-02 15:30:51 +08:00