iap: wire coin packs to Cafe Bazaar SKUs + auto-select Bazaar billing in the APK
- Pack ids now equal the Bazaar/Myket SKUs (Coin5K / Coin12K / Coin28K / Coin65K) in both the server source-of-truth (ProfileService.Packs) and the mock, so the IAB credit path (Id == ProductId) grants the right coins. Coin totals + prices already matched the registered products. - storeBilling.getStore(): when running inside the Capacitor Android shell and no explicit NEXT_PUBLIC_STORE flavor is set, default to "bazaar" so the APK uses Cafe Bazaar IAB (the web build stays on the ZarinPal gateway). Myket's native bridge still overrides when present. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -988,10 +988,11 @@ export class MockOnlineService implements OnlineService {
|
||||
|
||||
async getCoinPacks(): Promise<CoinPack[]> {
|
||||
return [
|
||||
{ id: "p1", coins: 5000, bonus: 0, priceToman: 99000, tag: "starter" },
|
||||
{ id: "p2", coins: 11000, bonus: 1000, priceToman: 199000, tag: "popular" },
|
||||
{ id: "p3", coins: 24000, bonus: 4000, priceToman: 399000, tag: "best" },
|
||||
{ id: "p4", coins: 50000, bonus: 15000, priceToman: 799000 },
|
||||
// id == Cafe Bazaar / Myket SKU (in-app product id).
|
||||
{ id: "Coin5K", coins: 5000, bonus: 0, priceToman: 99000, tag: "starter" },
|
||||
{ id: "Coin12K", coins: 11000, bonus: 1000, priceToman: 199000, tag: "popular" },
|
||||
{ id: "Coin28K", coins: 24000, bonus: 4000, priceToman: 399000, tag: "best" },
|
||||
{ id: "Coin65K", coins: 50000, bonus: 15000, priceToman: 799000 },
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user