#

SUD

简要描述

  • 更新用户积分

请求URL

  • 分为测试环境和生产环境,需要通知Sud分别进行配置
  • 生产环境地址需要正式上线部署后才能生效

请求方式

  • https
  • POST
  • 参数为Json格式,放在body内

回调验签

客户服务端需对回调内容进行验签,保证数据的完整性。

请求参数(可能会新增加字段,请服务端保持新增加字段兼容性)

参数名 必选 类型 说明
order_id string 唯一订单id,客户需对订单id进行幂等处理
mg_id string 游戏id
round_id string 游戏局id
uid string 用户uid
score int64 消耗或获得的用户积分数
type int32 操作类型 1: 消耗, 2: 获得

请求示例

{
  "order_id": "xxx",
  "mg_id": "xxx",
  "round_id": "xxx",
  "uid": "xxx",
  "score": 100,
  "type": 1
}

返回参数

参数名 必选 类型 说明
ret_code int32 错误码,0:成功,其他表示错误
ret_msg string 错误信息
data object data数据

data 参数说明

参数名 必选 类型 说明
score int64 用户积分

错误码定义(支持后续新增)[9000-9999]

错误码 错误信息 说明
9000 insufficient balance 余额不足
9001 duplicate order id 订单id重复

正确返回示例

{
    "ret_code": 0,            //错误码,0为成功,其他错误
    "ret_msg": "success",
    "data": {
      "score": 1000000
    }
}

带错误码返回示例

{
    "ret_code": 1,           //错误码,0为成功,其他错误
    "ret_msg": "failure",
    "data": {}
}

results matching ""

    No results matching ""