Launch a game进游戏
A one-time launch URL for a player. The first launch of an extPlayerId creates the player on our side.给玩家签一次性进游戏地址;某个 extPlayerId 第一次进游戏时平台自动建玩家。
/merchant/v1/games/launchCreates a one-time launch URL for a player. On the first launch of an extPlayerId the player is created on our side and bound to the currency returned by your /auth.
给玩家生成一次性的进游戏地址。某个 extPlayerId 第一次进游戏时,平台自动建玩家,并绑定商户 /auth 返回的币种。
Request请求
evo. pp is reserved and not open yet: it returns GAME_UNAVAILABLE.evo。pp 已预留但尚未开放,传它返回 GAME_UNAVAILABLE。tableCode / lobbyCode.进大厅(首页或某个分类)。tableCode 与 lobbyCode 必须且只能给一个。/auth.商户签发的短期玩家 token,≤ 256 字节。平台原样传给商户 /auth。^[A-Za-z0-9_-]{1,64}$. Must equal the extPlayerId your /auth returns for the token.商户侧玩家编号,^[A-Za-z0-9_-]{1,64}$。必须与 /auth 对这个 token 返回的 extPlayerId 相同。U+200B–U+200D, U+2060, U+FEFF) → INVALID_PARAM.≤ 32 个字符,只在玩家还没有昵称时生效。同一商户内唯一:已被占用时忽略(不报错),玩家进游戏后自己设置。含控制字符、双向控制符、零宽字符(U+200B–U+200D、U+2060、U+FEFF)→ INVALID_PARAM。en, en-US, pt-BR, zh-Hans. Applied only if the player has no language yet. Unknown values are ignored, not stored, and never fail the request.语言代码,如 en、en-US、pt-BR、zh-Hans。只在玩家还没有语言时生效。不认识的值忽略、不保存,也不会让请求失败。desktop or mobile; omitted = detected by the client.desktop 或 mobile;不传由客户端自己判断。http(s) URL for "back to site" in this session, ≤ 1024 bytes, no user name or password. Default: your configured value.本次会话「返回商户」的绝对 http(s) 地址,≤ 1024 字节,不能带用户名或密码;不传用商户配置值。http(s) URL for "deposit" in this session; same rules as homeUrl. Default: your configured value.本次会话「充值」的绝对 http(s) 地址,规则同 homeUrl;不传用商户配置值。Processing order处理顺序
We check what we can before calling your wallet, so a malformed request never reaches /auth.
先查平台能查的、最后才调商户钱包:参数错误的请求不会打到商户 /auth。
Response data响应 data
games/launch again for the same player and platform starts a new session and disconnects the previous game window; do it when the player re-enters, not to open a second table.一个玩家在一个平台上只有一个游戏会话,这个会话可以在同一个游戏窗口里同时玩多张桌(多窗口与多桌视图由游戏客户端提供),不需要每张桌各调一次进游戏。同一玩家同一平台再次调用 games/launch 会开新会话,之前的游戏窗口随即断开;只在玩家重新进入时调用,不要用它来开第二张桌。Result codes结果码
In addition to the common codes listed in另可能返回通用结果码,见 Result codes结果码.
Test cases测试用例
Run each case against the staging environment before go-live. Signature, timestamp, request ID and IP cases apply to every endpoint and are listed under上线前请在测试环境逐条执行。签名、时间戳、请求编号与 IP 相关用例适用于所有接口,见 Authentication签名认证.
G-01 Normal正常 Direct table entry直接进桌 Expected期望 OKG-02 Normal正常 Lobby entry进入大厅 Expected期望 OKG-03 Rejection拒绝 Both targets given同时给出两个目标 Expected期望 INVALID_PARAMG-04 Rejection拒绝 Unknown table机台不存在 Expected期望 GAME_NOT_FOUNDG-05 Rejection拒绝 Platform not open平台未开放 Expected期望 GAME_UNAVAILABLEG-06 Rejection拒绝 Token rejected by the merchant /auth商户 /auth 不认 token Expected期望 INVALID_TOKENG-07 Rejection拒绝 Player mismatch玩家不一致 Expected期望 PLAYER_MISMATCHG-08 Rejection拒绝 Currency not supported币种未开通 Expected期望 CURRENCY_NOT_SUPPORTEDG-09 Rejection拒绝 Currency changed币种变更 Expected期望 OK → CURRENCY_MISMATCHG-10 Rejection拒绝 Merchant wallet unavailable商户钱包不可用 Expected期望 WALLET_UNAVAILABLEG-11 Rejection拒绝 Invisible characters in nickname昵称含零宽字符 Expected期望 INVALID_PARAMG-12 Rejection拒绝 Unsafe homeUrlhomeUrl 不安全 Expected期望 INVALID_PARAMG-13 Normal正常 Launch URL is single-use进入游戏地址一次性有效 Expected期望 HTTP 302 → HTTP ≠ 302G-14 Rejection拒绝 Neither target given未给出目标 Expected期望 INVALID_PARAMG-15 Rejection拒绝 Unknown lobby大厅不存在 Expected期望 GAME_NOT_FOUNDG-16 Boundary边界 Token of 256 bytestoken 长 256 字节 Expected期望 INVALID_TOKENG-17 Boundary边界 Token of 257 bytestoken 长 257 字节 Expected期望 INVALID_PARAMG-18 Boundary边界 extPlayerId of 64 charactersextPlayerId 长 64 个字符 Expected期望 PLAYER_MISMATCHG-19 Boundary边界 extPlayerId of 65 charactersextPlayerId 长 65 个字符 Expected期望 INVALID_PARAMG-20 Rejection拒绝 Invalid characters in extPlayerIdextPlayerId 含不允许的字符 Expected期望 INVALID_PARAM ×2G-21 Boundary边界 Nickname of 32 characters昵称长 32 个字符 Expected期望 OKG-22 Boundary边界 Nickname of 33 characters昵称长 33 个字符 Expected期望 INVALID_PARAMG-23 Rejection拒绝 Control characters in nickname昵称含控制字符 Expected期望 INVALID_PARAM ×2G-24 Boundary边界 Country code国家代码 Expected期望 OK, INVALID_PARAMG-25 Boundary边界 Player IP玩家 IP Expected期望 OK, INVALID_PARAM ×2G-26 Boundary边界 Device设备类型 Expected期望 OK, INVALID_PARAMG-27 Boundary边界 homeUrl lengthhomeUrl 长度 Expected期望 OK, INVALID_PARAMG-28 Rejection拒绝 Unsafe cashierUrlcashierUrl 不安全 Expected期望 INVALID_PARAM ×2G-29 Boundary边界 Unknown language falls back不认识的语言回退 Expected期望 OKG-30 Boundary边界 Surrounding spaces are trimmed首尾空格被去除 Expected期望 OKG-31 Rejection拒绝 Player disabled by the merchant玩家被商户停用 Expected期望 PLAYER_DISABLEDG-32 Rejection拒绝 Wrong field type字段类型错误 Expected期望 INVALID_PARAM