/admin/billing/payment-gateways/{gateway_id}
修改支付网关的名称、JSON 配置或激活状态。支持部分更新。
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|---|---|
gateway_id |
path |
string |
是 | 支付网关ID |
请求体
Schema: service-billing/internal/handler/dto.UpdatePaymentGatewayRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
config |
string |
否 | {"app_id":"654321"} |
||
name |
string |
否 | 支付宝国际版 |
||
status |
string |
否 | active |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 支付网关更新成功 | service-billing/internal/handler/dto.PaymentGatewayDetailResponse |
| 400 | 请求参数错误 | object |
| 401 | 未授权 | object |
| 403 | 无权限 | object |
| 404 | 支付网关不存在 | object |
| 500 | 服务器内部错误 | object |
引用的 Schema
service-billing/internal/handler/dto.PaymentGatewayDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-billing/internal/handler/dto.PaymentGatewayResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-billing/internal/handler/dto.PaymentGatewayResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
string |
否 | alipay |
||
config |
string |
否 | |||
created_at |
string |
否 | 2026-01-01T00:00:00Z |
||
id |
string |
否 | pg_001 |
||
name |
string |
否 | 支付宝 |
||
status |
string |
否 | active |
||
updated_at |
string |
否 | 2026-04-10T14:20:00Z |