提交 953fb42e 作者: 薛若男

更新

上级 f9a8d705
# 服务端接口说明-v1.0.2
# 服务端接口说明-v1.0.2
......@@ -326,7 +326,7 @@
##### 接口说明
server/chat/report
>
>
##### 请求参数
......@@ -372,7 +372,7 @@ server/chat/report
##### 接口说明
server/map/report
>
>
##### 请求参数
......@@ -463,3 +463,40 @@ server/map/report
return json_decode($data, true);
}
```
### 3.3 掌游种花主游戏内购买指定商品上报
##### 接口说明
server/activity_product/reportLog
>
##### 请求参数
> **Headers**:
>
> | 参数 | 必选 | 参数值 | 说明 |
> | ------------ | ---- | ---------------- | ---- |
> | Content-Type | true | application/json | |
> **Body:**
>
> | 参数 | 必选 | 类型 | 默认值 | 说明 |
> |:------------------------------------------------------------------|:------|:---------|:----|:------------------------|
> | zw_app_id | true | string | - | 掌玩appId |
> | player_id | true | Int | - | 游戏登录后由 SDK 返回的player_id |
> | cp_role_id | true | string | - | cp角色ID |
> | product_id | true | String | - | 商品id |
> | product_name | true | String | - | 商品名称 |
> | product_cnt | true | String | - | 商品数量 |
> | product_price | true | String | - | 商品价格(分) |
> | pay_time | true | Int | - | 支付时间(时间戳) |
> | order_time | true | Int | - | 下单时间 (时间戳) | |
> | sign | true | String | - | 签名 |
##### 返回参数
> | 参数 | 必选 | 类型 | 默认值 | 说明 |
> | ----------- | ---- | ------ | ------ | -------- |
> | status_code | true | Int | - | 状态码 |
> | msg | true | STRING | - | 返回信息 |
> | data | | | | |
v1.0
++ /dev/null
v1.0
## 掌游种花主游戏内购买指定商品上报
检查是否可以发送
### 请求方式
1. POST 数据结构 JSON
2. Header数据需要加验证参数 Authorization
3. Authorization 将请求数据,
a. 按照key ascll 码小到大排序,
b.拼接参数 string = "key1=value1&key2=value2" + secert;
c. 将string 转为32 位的md5数据, stringMd5 = string.md5();
d. 截取stringMd5 第二位到第17位, 一共 16位字符串, 之后转为大写, 为Authorization
#### 1. 掌游种花主游戏内购买指定商品上报
https://zyouapi.wozhangwan.com/server/activity_product/reportLog
请求数据
| 字段 | 是否必传 | 字段类型 | | |
|------------------|------|--------|-----------|------|
| zw_app_id | 是 | String | 掌玩appId | |
| cp_role_id | 是 | String | cp角色ID | |
| player_id | 是 | string | 玩家id | |
| product_id | 是 | String | 商品id | |
| product_name | 是 | String | 商品名称 | |
| product_cnt | 是 | String | 商品数量 | |
| product_price | 是 | String | 商品价格(分) | |
| pay_time | 是 | String | 支付时间(时间戳) | |
| order_time | 是 | String | 下单时间(时间戳) | |
返回数据
| | 是否必要 | 字段类型 | |
| --------------- | -------- | -------- | ------------------------------------------------------------ |
| status_code | 是 | int | 1 成功 2 失败 |
| msg | 是 | string | 返回信息 : 处理成功 |
| data | 是 | Object | |
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论