Skip to content

Payment server: all sales final, Payment help form, cheat fixes - #266

Merged
ASCoding11 merged 18 commits into
ASCoding11:mainfrom
ngcoding10:wallet-hardening
Nov 19, 2026
Merged

ASCoding11 merged 18 commits into
ASCoding11:mainfrom
ngcoding10:wallet-hardening

Conversation

@ngcoding10

Copy link
Copy Markdown
Collaborator

No description provided.

…with a --check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
… checkout and webhook credit, node tests with faked Stripe and Firestore

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…rver wallet is in use; shop: captains' preview, Stripe emerald packs, Test mode tag; README and setup checklist

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…he shop with the server wallet (preview, payments on, signed out, everything off)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…filter.js (word lists generated, --check), refuse notes over 60 characters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…ead before either commits, so it no longer fails on a quiet run

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…ebacks take emeralds back, captain gifts mint nothing, rate limits

- Webhook: a non-numeric signature timestamp no longer skips the 5-minute replay check; bodies over 512 KB refused;
  events from a connected account ignored; livemode must match the Stripe key; Payment Link sessions and sessions
  not made by our checkout credit nobody and are written to orders/{session} as 'unclaimed'; the player comes only
  from metadata.uid (never client_reference_id, which a Payment Link takes from its address).
- charge.refunded, charge.dispute.created and charge.dispute.closed take back the pack's mangos (target-based, so
  idempotent and safe out of order); the balance may go below zero, and a negative wallet can't buy, open chests or gift.
- Captains' free gifts pay no duplicate refunds; a pack the recipient fully owns is refused as a gift.
- Rate limits inside the wallet transaction (changes a minute, gifts sent and received a day) and a per-instance
  call limit; wallet request bodies capped at 4 KB.
- Google keys: refetched on an unknown kid (at most once a minute), empty answers never cached; exp/iat must be numbers.
- Items the catalogue no longer lists stay in a wallet; the generator refuses a catalogue where a refund could pay
  back as much as a purchase costs.
- Tests for each.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…63334287a3deaa3/owned.js for games

/api/owned?uids=a,b,c (at most 24) answers, for each player, the item ids they own on the server (wallet items and
gifts, plus item-shop skus), '*' for captains, and the give items anyone may wear; a wallet below zero owns nothing.
No balance, history, notes or email. Cached 60 s at the edge by the sorted list; cache misses limited per address.
The signed-in /api/owned is unchanged. BackRoomOwned.check(uid, id) batches and caches these and answers
true / false / undefined (draw the default look), never throwing. No game uses it yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…s, limits, money rule), owned.js for games, owners' checklist (three charge events, Firestore rules to confirm, optional Cloudflare rate limit)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…ests for buy+gift and chest+chest races and junk inputs

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…_text.submit), tested

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…n; Payment help form (email + what happened, sent as a "Payment help:" note through feedback.js with the account id and last 5 wallet lines, one a day); Spanish for the new words via lang.js; browser tests at laptop, phone and phone sideways

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
…ts), privacy.html note for the owners

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfCR7RPoK1UNAvb7iRuPWn
@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for cosmic-dasik-e73c56 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0ce28c1

@netlify

netlify Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

👷 Deploy request for ascoding11 pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0ce28c1

@ASCoding11
ASCoding11 merged commit 66ef341 into ASCoding11:main Nov 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants