fix: update production app configuration
This commit is contained in:
@@ -108,7 +108,6 @@ This document is the source of truth for backend RFC7807 `code` values consumed
|
||||
|---|---:|---|---|
|
||||
| `PAYMENT_PRODUCT_NOT_FOUND` | 404 | `productCode` does not exist or is not enabled | Refresh packages and show product-unavailable message |
|
||||
| `PAYMENT_PRODUCT_MISMATCH` | 422 | Client product ID does not match backend/Apple verification result | Block grant and prompt retry |
|
||||
| `PAYMENT_ENVIRONMENT_MISMATCH` | 422 | Transaction environment (Sandbox/Production) does not match server environment | Show purchase-verification-failed message |
|
||||
| `PAYMENT_TRANSACTION_INVALID` | 422 | Apple signed transaction invalid, signature verification failed, or payload malformed | Show purchase-verification-failed message |
|
||||
| `PAYMENT_TRANSACTION_REVOKED` | 409 | Transaction has been revoked or refunded, grant not allowed | Show purchase-unavailable message |
|
||||
| `PAYMENT_TRANSACTION_CONFLICT` | 409 | Transaction already processed by another user or in conflicting state | Prompt to contact support or refresh balance |
|
||||
|
||||
@@ -14,6 +14,7 @@ Protocol verification status:
|
||||
|
||||
- Current strategy: additive evolution (`backward-compatible`).
|
||||
- Breaking change requires explicit migration + rollback notes (`requires-migration`).
|
||||
- Apple IAP environment is auto-detected from verified Apple transaction payloads; the verify API is not split by Sandbox/Production.
|
||||
|
||||
## Route overview
|
||||
|
||||
@@ -70,7 +71,6 @@ Verify and grant credits for an Apple IAP transaction.
|
||||
|---|---:|---|
|
||||
| `PAYMENT_PRODUCT_NOT_FOUND` | 404 | `productCode` does not exist or is not enabled |
|
||||
| `PAYMENT_PRODUCT_MISMATCH` | 422 | Client product ID does not match backend/Apple verification result |
|
||||
| `PAYMENT_ENVIRONMENT_MISMATCH` | 422 | Transaction environment (Sandbox/Production) does not match server environment |
|
||||
| `PAYMENT_TRANSACTION_INVALID` | 422 | Apple signed transaction invalid, signature verification failed, or payload malformed |
|
||||
| `PAYMENT_TRANSACTION_REVOKED` | 409 | Transaction has been revoked or refunded, grant not allowed |
|
||||
| `PAYMENT_TRANSACTION_CONFLICT` | 409 | Transaction already processed by another user or in conflicting state |
|
||||
@@ -119,6 +119,14 @@ product_mappings:
|
||||
- Backend tracks purchase via `register_bonus_claims.has_purchased_starter_pack`
|
||||
- If already purchased, returns `PAYMENT_STARTER_PACK_INELIGIBLE` (409)
|
||||
|
||||
## Environment handling
|
||||
|
||||
- `signedTransactionInfo` is verified server-side and its Apple-provided `environment` field is the source of truth.
|
||||
- Valid environments are `Sandbox` and `Production`.
|
||||
- TestFlight and App Review Sandbox transactions are accepted when Apple signs them as `Sandbox`.
|
||||
- App Store Production transactions are accepted when Apple signs them as `Production`.
|
||||
- Backend configuration defaults to `apple_iap.environment=auto`; it must not force all verifications into one Apple environment.
|
||||
|
||||
## Ledger integration
|
||||
|
||||
- Successful purchases create a ledger entry with:
|
||||
|
||||
Reference in New Issue
Block a user