From 9cce016b901158c0ef2f4de427e0640485b97bb4 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Fri, 12 Jun 2026 21:33:58 +0330 Subject: [PATCH] config: fix IAB package name + flatten Production Iab example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - appsettings.json + docker-compose default: PackageName com.bargevasat.hokm → com.bargevasat.app (the validate API URL embeds it; wrong value breaks Bazaar/Myket token verification). - appsettings.Production.json.example: Iab keys were nested (Iab.Bazaar.*, Iab.Myket.*) which don't bind to the flat IabOptions; flattened to PackageName / BazaarClientId / ... / MyketAccessToken. MyketAccessToken is already wired end to end: ENV_FILE IAB_MYKET_ACCESS_TOKEN → compose Iab__MyketAccessToken → IabOptions.MyketAccessToken → VerifyMyket. Co-Authored-By: Claude Opus 4.8 --- docker-compose.yml | 2 +- .../appsettings.Production.json.example | 19 +++++++------------ server/src/Hokm.Server/appsettings.json | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 957dd10..409999c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -57,7 +57,7 @@ services: Zarinpal__CallbackUrl: ${ZARINPAL_CALLBACK_URL:-http://localhost:1505/api/coins/pay/callback} Zarinpal__ClientReturnUrl: ${ZARINPAL_CLIENT_RETURN_URL:-http://localhost:1500} # Store in-app billing verification (Cafe Bazaar / Myket) — fill from panels. - Iab__PackageName: ${IAB_PACKAGE_NAME:-com.bargevasat.hokm} + Iab__PackageName: ${IAB_PACKAGE_NAME:-com.bargevasat.app} Iab__BazaarClientId: ${IAB_BAZAAR_CLIENT_ID:-} Iab__BazaarClientSecret: ${IAB_BAZAAR_CLIENT_SECRET:-} Iab__BazaarRefreshToken: ${IAB_BAZAAR_REFRESH_TOKEN:-} diff --git a/server/src/Hokm.Server/appsettings.Production.json.example b/server/src/Hokm.Server/appsettings.Production.json.example index 1914cb6..633b03d 100644 --- a/server/src/Hokm.Server/appsettings.Production.json.example +++ b/server/src/Hokm.Server/appsettings.Production.json.example @@ -22,17 +22,12 @@ "ClientReturnUrl": "https://bargevasat.ir" }, "Iab": { - "// note": "Cafe Bazaar / Myket in-app purchase. Fill after publishing & getting store creds.", - "AllowUnverified": false, - "Bazaar": { - "PackageName": "com.bargevasat.app", - "ClientId": "", - "ClientSecret": "", - "RefreshToken": "" - }, - "Myket": { - "PackageName": "com.bargevasat.app", - "AccessToken": "" - } + "// note": "Cafe Bazaar / Myket in-app purchase. Fill after publishing & getting store creds. Keys are FLAT (must match IabOptions).", + "PackageName": "com.bargevasat.app", + "BazaarClientId": "", + "BazaarClientSecret": "", + "BazaarRefreshToken": "", + "MyketAccessToken": "", + "AllowUnverified": false } } diff --git a/server/src/Hokm.Server/appsettings.json b/server/src/Hokm.Server/appsettings.json index 27c6484..c006073 100644 --- a/server/src/Hokm.Server/appsettings.json +++ b/server/src/Hokm.Server/appsettings.json @@ -25,7 +25,7 @@ "ClientReturnUrl": "http://localhost:3000" }, "Iab": { - "PackageName": "com.bargevasat.hokm", + "PackageName": "com.bargevasat.app", "BazaarClientId": "", "BazaarClientSecret": "", "BazaarRefreshToken": "",