Check_Balance.md 1.3 KB

查询余额

描述

此功能是玩家登录Besoft的游戏之前,Besoft要从游戏运营商(Host)获取玩家身上的实际金额。

请求方式(BeSoft -> Host):post

Besoft发出的请求数据格式是: application/json

Host返回数据格式是: application/json

请求地址

由运营商(Host)提供。

https://{host}/[notify_url]

http://{host}/[notify_url]

请求参数

| 名称 | 类型 | 必要 | 描述 | | -------- | -------- | -------- | -------- |
| action | int32 | Y | 1, 请求分数标识符 | | uid |string | Y | 游戏运营商玩家帐号 | | ts | string(214) | Y | 消息请求的unix时间戳 | | currency| string(3) | Y | 货币编码 | | gid| string(20) | Y | 进入游戏的唯一id |

返回结果

| 名称 | 类型 | 描述 |
| -------- | -------- | -------- |
| action | int32 | 1 ,返回请求分数标识符|
| status |int32| 状态代码,类型是int32_t | | balance | double | 用户当前最新分数,精确到小数点后面四位有效浮点数 |
| currency| string(3) | 货币编码 |

成功的结果

{"action":1,"status":1,"balance":10000.0123,"currency":"USD"}

失败的结果

{"status": 1003}