Skip to content

储值礼包控制查询接口 ​

接口地址 ​

https://xxx.gamepartner.com/product

*备注:url由原厂定义,规则未做设定,需要对接时双方再协定*


請求參數 ​

字段名称类型是否必须说明
roleidstring是角色id
servercodestring是服务器编码
timestamplong是时间戳 【精确到秒】
signaturestring是验证码,md5(roleid+servercode+timestamp+“key”) ; key=R$o)L3e##^b(如:8~32位長度,大小寫字母或数字,不含特殊符号)

請求方式 ​

請求URL(需要支持post和get方式,建議優先POST)[默认application/x-www-form-urlencoded]

請求示例 ​

https://xxx.gamepartner.com/product?roleid=testroleid&servercode=s1&timestamp=1875432234567&signature=babw74wt4b6q2if27oquh38qvwehfof


返回結果 ​

*备注:以json格式返回,如有其他code类型请定义并提供说明*

字段名称类型说明
codestring接收推送请求状态码,具体code如下: ; 1000=查询礼包成功,具体礼包信息见productList ; 9999或其他=查询失败,或系统异常
messagestring成功或错误信息描述
productListjsonarray具体该角色ID可以购买的礼包信息列表

普通方式返回示例 ​

json
{"code":"1000","message":"成功","productList":["A50","A100","A200"]}

帶透傳參數方式返回示例 ​

proItemId:品項ID name:品項名稱 arg:透傳參數

json
{"code":"1000","message":"成功","productList":[{"proItemId":"A50","name":"元寶50","arg":"xxxxxxxxxxxxxxx1"},{"proItemId":"A100","name":"元寶100","arg":"xxxxxxxxxxxxxxx2"}]}