data 透传闭环:发货数据回显、回调带回,并限制 2KB
- 「查询发货数据」响应新增 data(下单透传原样回显,供自建发货页预填/展示) - 回调 payload 带回 data(下单传 → 回调收,商户对接免回查) - 创建订单 data 限制最长 2048 字节 - 文档更新:data 用途(自建页预填/回调/上游查单约定字段)、发货数据与回调示例 - 单测覆盖 data 回显
This commit is contained in:
@@ -94,6 +94,7 @@ const deliveryOrderResponseExample = `{
|
||||
"game_uid": "4808146277",
|
||||
"role_name": "巫师哈丁12",
|
||||
"pay_score": 360,
|
||||
"data": { "game_account": "4808146277", "game_channel": "ios-wechat", "role_name": "玩家名" },
|
||||
"good": { "title": "套装-糯粉咩咩", "image": "https://..." }
|
||||
}
|
||||
}`
|
||||
@@ -196,14 +197,14 @@ export const endpoints: EndpointSpec[] = [
|
||||
{ name: 'sku', type: 'string', required: true, desc: '商品标识,取自商品列表', example: 'suit_pink_sheep' },
|
||||
{ name: 'quantity', type: 'int', desc: '数量,默认 1', example: '1' },
|
||||
{ name: 'buyer_reference', type: 'string', desc: '买家标识/备注', example: 'buyer-001' },
|
||||
{ name: 'data', type: 'object', desc: '透传给发货流程的业务数据(区服、账号等),原样存储并回显' },
|
||||
{ name: 'data', type: 'object', desc: '透传业务数据(最长 2048 字节)。自建发货页模式会原样返回给「查询发货数据」用于预填/展示;回调 payload 也会带回;约定字段 game_account/game_channel/role_name 会同步给上游查单' },
|
||||
],
|
||||
requestExample: `{
|
||||
"client_order_no": "shop-10001",
|
||||
"sku": "suit_pink_sheep",
|
||||
"quantity": 1,
|
||||
"buyer_reference": "buyer-001",
|
||||
"data": { "server": "ios-wechat", "uid": "player-id" }
|
||||
"data": { "game_account": "4808146277", "game_channel": "ios-wechat", "role_name": "玩家名" }
|
||||
}`,
|
||||
responseExample: `{
|
||||
"code": 0,
|
||||
@@ -317,6 +318,7 @@ export const endpoints: EndpointSpec[] = [
|
||||
{ name: 'game_uid', type: 'string', desc: 'UID / 角色编号' },
|
||||
{ name: 'role_name', type: 'string', desc: '角色名' },
|
||||
{ name: 'pay_score', type: 'int', desc: '消耗积分' },
|
||||
{ name: 'data', type: 'object', desc: '下单时透传的业务数据(原样返回,可用于预填玩家编号/展示区服)' },
|
||||
{ name: 'good', type: 'object', desc: '上游商品详情' },
|
||||
],
|
||||
notes: [
|
||||
|
||||
@@ -490,14 +490,15 @@ const callbackPayloadExample = `{
|
||||
"client_order_no": "shop-10001",
|
||||
"order_status": "delivered",
|
||||
"can_ship": false,
|
||||
"product": { "sku": "suit_pink_sheep", "name": "套装-糯粉咩咩" },
|
||||
"product_sku": "suit_pink_sheep",
|
||||
"quantity": 1,
|
||||
"amount": 105,
|
||||
"currency": "POINT",
|
||||
"provider_order_no": "PROV-xxxx",
|
||||
"failure_reason": "",
|
||||
"created_at": "2026-08-03T10:00:00+08:00",
|
||||
"delivered_at": "2026-08-03T10:11:20+08:00"
|
||||
"delivered_at": "2026-08-03T10:11:20+08:00",
|
||||
"data": { "game_account": "4808146277", "game_channel": "ios-wechat", "role_name": "玩家名" }
|
||||
}
|
||||
}`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user