feat(billing): Google Play build shows "not implemented" for coin buys
Add a gated `googleplay` store flavor (NEXT_PUBLIC_STORE=googleplay) so the appeal/Play build ships a payment-free coin shop. isPurchaseDisabled() makes BuyCoinsScreen short-circuit to a "not implemented" notice instead of starting ZarinPal or Iranian IAB (both rejected on Play). Default web/Bazaar/Myket builds are unaffected. New i18n key buy.notImplemented (fa+en). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import { ScreenHeader, ScreenShell } from "@/components/online/ScreenHeader";
|
||||
import { useSessionStore } from "@/lib/session-store";
|
||||
import { useI18n } from "@/lib/i18n";
|
||||
import { getService } from "@/lib/online/service";
|
||||
import { consumeStorePurchase, isStoreBilling, purchaseViaStore } from "@/lib/storeBilling";
|
||||
import { consumeStorePurchase, isPurchaseDisabled, isStoreBilling, purchaseViaStore } from "@/lib/storeBilling";
|
||||
import { sound } from "@/lib/sound";
|
||||
import { CoinPack } from "@/lib/online/types";
|
||||
import { cn } from "@/lib/cn";
|
||||
@@ -39,6 +39,14 @@ export function BuyCoinsScreen() {
|
||||
setBusy(p.id);
|
||||
setMsg("");
|
||||
|
||||
// Google Play build: coin purchases are intentionally not wired (no Iranian
|
||||
// IAB on Play). Show a notice instead of starting any payment flow.
|
||||
if (isPurchaseDisabled()) {
|
||||
setMsg(t("buy.notImplemented"));
|
||||
setBusy(null);
|
||||
return;
|
||||
}
|
||||
|
||||
// Inside a store build (Cafe Bazaar / Myket), route through store billing.
|
||||
if (isStoreBilling()) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user