feat(registry): Google Play: verify, acknowledge and revoke Play Billing purchases #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/registry-google-play"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Premium phase 8, registry side: Google Play purchase verification.
POST /api/v1/play/purchases{game, itemId, purchaseToken}(account, rate limited): readspurchases.products.getfor the game's package (GOOGLE_PLAY_PACKAGES) and the item'sstoreIds.play, requiresobfuscatedExternalAccountIdto be the caller's account, grants with sourcegoogle_playunder the purchase token, then acknowledges. Pending grants nothing; canceled revokes. Resending a token is safe and retries a failed acknowledgement.voidedpurchasespass over the last 29 days revokes listed tokens;POST /api/v1/admin/play/reconcileruns it now.token_uri, access token cached; stdlib only, no new dependency. No migration: the purchase token is the receipt id.GOOGLE_PLAY_SERVICE_ACCOUNTandGOOGLE_PLAY_PACKAGES; a key that does not parse stops boot.google_play_service_account).assumed: the client must set the obfuscated account id to the registry account id, and a purchase without one is refused (403), because otherwise anyone holding a token could claim it; the Unity IAP client is not built yet, so it can comply.
assumed: catalog store key stays
play(already documented), the entitlement source isgoogle_play(per the task).assumed: a retired catalog item is still verified, since the purchase was paid for.
assumed: voids arrive by polling voidedpurchases (cadence
playVoidedEvery), since no Pub/Sub topic for RTDN exists.Checks:
gofmt -lclean,go vetclean,go test ./...in registry/ against Docker Postgres and MinIO: 123 passed, 7 of them new (googleplay_test.go, fake Google token endpoint that checks the JWT signature plus the Developer API). One full run hadTestForgejoSignInRefusesOthersfail once; it passed alone and on the next full run, and this diff does not touch admin sign-in.Not here: Unity IAP client (waits for phase 2 client), App Store (no iOS build), creating the service account and Play products (human setup, README steps).
https://claude.ai/code/session_01BALUC5m2PmpaoFufz7oZVE