增加发货平台 2
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
创建订单
|
||||
按 product_code(商品编码)下单并扣减钱包积分。相同 platform_order_no 重复请求返回原订单(幂等)。
|
||||
|
||||
#接口地址
|
||||
code
|
||||
POST /api/open/v1/orders/store
|
||||
#请求方式
|
||||
POST
|
||||
|
||||
#请求参数
|
||||
Body 为 JSON 对象:
|
||||
|
||||
参数名 类型 必填 说明
|
||||
platform_order_no string 是 您的业务单号(幂等键,最长 64 字符)
|
||||
product_code string 是 商品列表返回的 product_code
|
||||
platform_buy_num number 否 购买数量,默认 1;不得超过商品列表返回的 max_order_quantity
|
||||
platform_amount number 否 平台侧记录用金额,默认 0
|
||||
player_account string 否 玩家 UID;不传则由买家在 H5 填写
|
||||
player_game_region string 否 区服-系统(如 安卓 / 苹果)
|
||||
player_game_srv string 否 区服-渠道(如 微信 / QQ)
|
||||
player_game_role string 否 角色名
|
||||
submit_player boolean 否 true 且已传 player_account 时,直接提交玩家信息(状态 17);否则待买家在 H5 操作(状态 15)
|
||||
notify_url string 否 订单状态变更时的异步通知地址(http/https,最长 500 字符),见 订单异步通知
|
||||
#响应参数
|
||||
data.order 字段说明:
|
||||
|
||||
参数名 类型 说明
|
||||
data.order.order_no string 平台内部单号
|
||||
data.order.platform_order_no string 您的业务单号
|
||||
data.order.platform string 固定为 api
|
||||
data.order.product_name string 商品名称
|
||||
data.order.recharge_status number 充值状态码(见下表)
|
||||
data.order.recharge_status_label string 充值状态中文
|
||||
data.order.status number 同 recharge_status
|
||||
data.order.status_label string 同 recharge_status_label
|
||||
data.order.points_charged number 本单扣除积分
|
||||
data.order.player_account string 玩家 UID
|
||||
data.order.created_at string 创建时间 YYYY-MM-DD HH:mm:ss
|
||||
data.order.platform_buy_num number 购买数量
|
||||
data.order.player_game_region string 区服-系统
|
||||
data.order.player_game_srv string 区服-渠道
|
||||
data.order.player_game_role string 角色名
|
||||
data.order.recharge_bind_required number 是否需绑定 0 / 1
|
||||
data.order.recharge_bind_url string | null 绑定链接(发货中且需绑定时可能有值)
|
||||
data.order.recharge_bind_at string | null 绑定链接生成时间
|
||||
data.order.recharge_submit_at string | null 提交充值时间
|
||||
data.order.recharge_finish_at string | null 完成时间
|
||||
data.order.recharge_result_message string | null 充值结果说明
|
||||
data.order.updated_at string 更新时间
|
||||
data.order.h5.entry_url string H5 兑换首页(买家手动输入单号,一般少用)
|
||||
data.order.h5.recharge_url string 推荐:发给买家的充值/绑定链接
|
||||
#状态码
|
||||
值 含义
|
||||
15 待买家在 H5 提交信息
|
||||
17 买家已提交,处理中
|
||||
20 发货中
|
||||
30 成功
|
||||
40 失败
|
||||
50 需人工处理
|
||||
60 已取消
|
||||
开放 API 订单不含店铺券码/核销字段(platform_coupon_*、is_verifi 等)。
|
||||
|
||||
#响应示例
|
||||
待买家在 H5 填写 UID(recharge_status = 15):
|
||||
|
||||
json
|
||||
{
|
||||
"code": 0,
|
||||
"message": "下单成功",
|
||||
"data": {
|
||||
"order": {
|
||||
"order_no": "202601011200001234",
|
||||
"platform_order_no": "YOUR-ORDER-001",
|
||||
"platform": "api",
|
||||
"product_name": "和平精英点券",
|
||||
"recharge_status": 15,
|
||||
"recharge_status_label": "待绑定",
|
||||
"status": 15,
|
||||
"status_label": "待绑定",
|
||||
"points_charged": 3800,
|
||||
"player_account": "",
|
||||
"created_at": "2026-01-01 12:00:00",
|
||||
"product_code": "10000001",
|
||||
"platform_buy_num": 1,
|
||||
"player_game_region": "",
|
||||
"player_game_srv": "",
|
||||
"player_game_role": "",
|
||||
"recharge_bind_required": 0,
|
||||
"recharge_bind_url": null,
|
||||
"recharge_bind_at": null,
|
||||
"recharge_submit_at": null,
|
||||
"recharge_finish_at": null,
|
||||
"recharge_result_message": null,
|
||||
"updated_at": "2026-01-01 12:00:00",
|
||||
"h5": {
|
||||
"entry_url": "http://skin-exchange.yiquyou.icu/h5/exchange",
|
||||
"recharge_url": "http://skin-exchange.yiquyou.icu/h5/bind?code=..."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
已传 UID 且 submit_player: true(recharge_status = 17)时,recharge_url 可能指向绑定页或处理页,字段结构相同。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user