diff --git a/uml/game2006api_20230712.md b/uml/game2006api_20230712.md index 37f765a4..fd604dfd 100644 --- a/uml/game2006api_20230712.md +++ b/uml/game2006api_20230712.md @@ -31,14 +31,15 @@ 请求方法: [GET] 参数说明: -| 参数名 | 类型 |必填 | 说明 | -| ----------- | ------- | ---- | ------------------------------------------------- | + +| 参数名 | 类型 |必填 | 说明 | +| ----------- | ------- | ----- | --------------------------------------------------------- | | account_id | string | 是 | 账户id (中心化游戏账号,充值成功后会给绑定的账号一些奖励) | -| oreder_id | string | 是 | 订单id | -| status | string | 是 | 订单状态 | -| id | string | 是 | goods_id | -| txhash | string | 是 | txhash | -| sign | string | 是 | 签名 | +| oreder_id | string | 是 | 订单id | +| status | string | 是 | 订单状态 | +| id | string | 是 | goods_id | +| txhash | string | 是 | txhash | +| sign | string | 是 | 签名 | 调用说明: @@ -67,4 +68,52 @@ "errcode": 0, // 0 操作成功 "errmsg" : "" } -``` \ No newline at end of file +``` + +3. 内购回调 + +调用方: 内购服务(hongliang) + +地址: + +请求方法 [POST] + +参数说明: + +| 参数名 | 类型 |必填 | 说明 | +| ----------- | ------- | ---- | ------------------------------------------------- | +| channel | string | 是 | google or apple | +| records | array | 是 | 订单表,一次返回多个 | +| sign | string | 是 | 签名 | + + +调用说明: +``` + // { + // channel: 'google', + // sign: '123456677' // 签名字段 + // records: [{ + // productId: '2999', // 从google play console获取的product id + // gameOrderId: '1231321312', // 开始支付时, 从游戏相关服务那获得的订单id + // orderId: 'GPA.3355-1172-9416-16839', // 从google develope API 获取的订单id + // status: 9, // 订单状态, 上报的订单状态一般只有2种情况, 9: 支付成功, 96: 用户退款 + // }] + // } + // let reportData: any = { + // channel: 'google', + // records, + // } + // const hashSort = 'iG4Rpsa)6U31$H#^T85$^^3' + // const signStr = 'channel=google&' + records.map(record =>Object.keys(record).sort().map(key => `${key}=${record[key]}`).join('&')).join('&') + + // const sign = hmacsha256(signStr, hashSort) + + // 定义一个空数组,用来存放每个记录的键值对字符串 +``` +返回说明: +``` +{ + "errcode": 0, // 0 操作成功 + "errmsg" : "" +} +```