From a44f58cd0fdafbfb25197942e16d0709d47e1930 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Mon, 3 Aug 2026 13:53:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=80=E6=94=BE=20API=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=9A=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=93=8D=E5=BA=94=E7=A4=BA=E4=BE=8B=E8=A1=A5=E5=85=A8=E4=B8=BA?= =?UTF-8?q?=E7=9C=9F=E5=AE=9E=E5=AE=8C=E6=95=B4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 响应示例从 4 个字段补全为完整订单对象(product/金额/手续费/时间等 21 字段) - 备注补充双单号说明:下单后保存 order_no 用于后续链路,client_order_no 仅用于幂等 - 说明 data 透传字段行为 --- frontend/src/openapi/endpoints.ts | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/frontend/src/openapi/endpoints.ts b/frontend/src/openapi/endpoints.ts index f0773d0..12754aa 100644 --- a/frontend/src/openapi/endpoints.ts +++ b/frontend/src/openapi/endpoints.ts @@ -214,18 +214,34 @@ export const endpoints: EndpointSpec[] = [ "order_no": "FO20260730000123", "client_order_no": "shop-10001", "order_status": "paid", - "can_ship": true + "can_ship": true, + "cannot_ship_reason": "", + "product": { "sku": "suit_pink_sheep", "name": "套装-糯粉咩咩" }, + "quantity": 1, + "base_amount": 100, + "fee_type": "rate", + "service_fee_amount": 5, + "amount": 105, + "currency": "POINT", + "buyer_reference": "buyer-001", + "data": { "server": "ios-wechat", "uid": "player-id" }, + "provider_order_no": "", + "failure_reason": "", + "created_at": "2026-07-30T10:00:00+08:00", + "delivered_at": null, + "cancelled_at": null } } }`, responseFields: [ - { name: 'idempotent', type: 'bool', desc: 'true 表示该 client_order_no 已存在,返回既有订单' }, - { name: 'order', type: 'object', desc: '订单对象,字段见「订单字段说明」' }, + { name: 'idempotent', type: 'bool', desc: 'true 表示该 client_order_no 已存在,返回既有订单(未重复扣款)' }, + { name: 'order', type: 'object', desc: '订单完整对象,字段见下方「订单字段说明」' }, ], notes: [ - 'client_order_no 是唯一幂等单号,请保证同一商户下不重复。', + 'client_order_no 是唯一幂等单号,请保证同一商户下不重复;重复请求不会重复扣款,返回 idempotent=true 及既有订单。', '当前无真实支付流程,下单成功即扣款并进入 order_status=paid,余额不足返回 400。', - '同一 client_order_no 重复请求不会重复扣款,返回 idempotent=true。', + '下单成功后请保存 order_no,后续查询/发货/回调均以 order_no 为准;client_order_no 仅用于幂等。', + 'data 字段会原样存储并回显,可用于透传区服、账号等业务数据。', ], }, {