What it is
«انتخاب جایزه» (choose a prize) is the Baziness reward shop: a page where players spend Gita coins on real prizes. Your game does three things:
- earns coins for the player (Gita coins)
- shows the balance on a button or banner
- opens the reward page in the in-game web view when the button is tapped
flowchart LR
A["Lobby banner<br/>«انتخاب جایزه» + balance"] -->|tap| B{"platform<br/>enabled?"}
B -- no --> T["toast: available after<br/>connecting Baziness"]
B -- yes --> C["open sheet:<br/>{webBase}/shop?game_name=…"]
C --> D["player picks prizes,<br/>spends Gita coins"]
D -->|swipe down / close| E["sheet closed →<br/>refresh get-coin"]The address
{web}/shop?game_name=<your game>&packageName=<package>&sdkType=js&linkedToken=<user token>&redirect=shopThe parameters are explained on Baziness pages. Two rules matter most here:
- Open
/shop, not the site root. The root sends a player inside a game to the sign-in screen. - Don't add
allowGuest=false: the shop is a destination, not a sign-in.
The button in your game
- Put it where players look: the lobby or the main menu. Show the live balance on it, with the Gita coin icon.
- When Baziness is off, either hide it or show "available after connecting to Baziness" when it is tapped.
- During your tutorial, the first tap can open your game offer page instead.
After the page closes
The player may have spent coins, so refresh the balance as soon as the view closes, and again when the game regains focus.
Hiding the platform's bottom bar (optional)
The Baziness site has its own bottom navigation (فروشگاه / بازیها / خانه / ماموریتها / بازینس من). Inside your game you may want to hide it. The page belongs to another site, so your CSS and scripts can't reach into it. Instead:
- Make the web view taller than its container by the bar's height.
- Let the container clip what overflows.
The bar sits at the bottom of the page, so it falls outside the visible area while the rest of the page still scrolls. Tune the height on real phones. Code.
Builds without Baziness
A build that ships without Baziness, for example some store builds, must not show the button or advertise Gita coin rewards. Let your server decide: it answers { enabled: false } for that build, and the client never draws any of it.
Checklist
- The button shows the live balance (
…while loading or on failure). - It opens
/shopwithgame_name,packageName,sdkType=js,linkedTokenandredirect=shop. - No
allowGuest=false, and not the site root. - The balance refreshes when the view closes and when the game regains focus.
- With Baziness off, the button is hidden or explains why it isn't available.