feat: C端订单支付拆分 — 创建订单与发起支付分离
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m10s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m10s
- CreateOrder 改造:普通下单只建单(无支付参数),强充场景保持原有微信支付一步完成 - 新增 POST /orders/:id/pay 统一支付入口,支持 wallet(钱包)和 wechat(微信 JSAPI) - 移除 POST /orders/:id/wallet-pay,合并至统一支付接口 - app_type 改为可选字段(强充场景必传,普通下单无需传) - CreateOrderResponse.pay_config 改为 omitempty(普通下单不返回支付参数)
This commit is contained in:
@@ -1597,7 +1597,7 @@ components:
|
||||
DtoClientCreateOrderRequest:
|
||||
properties:
|
||||
app_type:
|
||||
description: 应用类型 (official_account:公众号, miniapp:小程序)
|
||||
description: 应用类型(强充必传)(official_account:公众号, miniapp:小程序)
|
||||
type: string
|
||||
identifier:
|
||||
description: 资产标识符(SN/IMEI/虚拟号/ICCID/MSISDN)
|
||||
@@ -1614,7 +1614,6 @@ components:
|
||||
required:
|
||||
- identifier
|
||||
- package_ids
|
||||
- app_type
|
||||
type: object
|
||||
DtoClientCreateOrderResponse:
|
||||
properties:
|
||||
@@ -1849,6 +1848,25 @@ components:
|
||||
description: 时间戳
|
||||
type: string
|
||||
type: object
|
||||
DtoClientPayOrderParams:
|
||||
properties:
|
||||
app_type:
|
||||
description: 应用类型(微信支付必传)(official_account:公众号, miniapp:小程序)
|
||||
type: string
|
||||
payment_method:
|
||||
description: 支付方式 (wallet:钱包, wechat:微信)
|
||||
type: string
|
||||
required:
|
||||
- payment_method
|
||||
type: object
|
||||
DtoClientPayOrderResponse:
|
||||
properties:
|
||||
pay_config:
|
||||
$ref: '#/components/schemas/DtoClientPayConfig'
|
||||
payment_method:
|
||||
description: 支付方式
|
||||
type: string
|
||||
type: object
|
||||
DtoClientRechargeCheckResponse:
|
||||
properties:
|
||||
force_recharge_amount:
|
||||
@@ -22879,6 +22897,78 @@ paths:
|
||||
summary: 订单详情
|
||||
tags:
|
||||
- 个人客户 - 订单
|
||||
/api/c/v1/orders/{id}/pay:
|
||||
post:
|
||||
parameters:
|
||||
- description: ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: ID
|
||||
minimum: 0
|
||||
type: integer
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DtoClientPayOrderParams'
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code:
|
||||
description: 响应码
|
||||
example: 0
|
||||
type: integer
|
||||
data:
|
||||
$ref: '#/components/schemas/DtoClientPayOrderResponse'
|
||||
msg:
|
||||
description: 响应消息
|
||||
example: success
|
||||
type: string
|
||||
timestamp:
|
||||
description: 时间戳
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- msg
|
||||
- data
|
||||
- timestamp
|
||||
type: object
|
||||
description: 成功
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 请求参数错误
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 未认证或认证已过期
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 无权访问
|
||||
"500":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 服务器内部错误
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 订单支付
|
||||
tags:
|
||||
- 个人客户 - 订单
|
||||
/api/c/v1/orders/create:
|
||||
post:
|
||||
requestBody:
|
||||
|
||||
Reference in New Issue
Block a user