payment-history: /{id} lists the order's payments, logs move to /{id}/logs
GET /payment-history/{id} now returns one row per payment of the order
(paid, card, time, period, amounts), newest first - the per-order payment
table the frontend already calls. The step-by-step logs it used to return
are kept at GET /payment-history/{id}/logs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
94
docs/docs.go
94
docs/docs.go
@@ -5437,7 +5437,68 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout - evidence of what actually happened, independent of the summary rows returned by the list endpoint",
|
||||
"description": "Returns every visa/master/sber payout attempt of one order, newest first - one row per payment with whether it was paid (paid/gatewayStatus), the card it was paid from (cardholderName/maskedPan, once GBÜS reports them), its time (createdAt) and period (paymentPeriod). The raw GBÜS response of a row is at /payment-history/payments/{id}; the step-by-step logs are at /payment-history/{id}/logs.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"payment-history"
|
||||
],
|
||||
"summary": "List an order's payments",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Order ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/payment-history/{id}/logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout, newest first - evidence of what actually happened, independent of the summary rows returned by /payment-history/{id}",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -5458,7 +5519,10 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentLogDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -10091,6 +10155,32 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentLogDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdByName": {
|
||||
"type": "string"
|
||||
},
|
||||
"detail": {
|
||||
"type": "object"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"step": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymentsettings.PaymentSettingsDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -5431,7 +5431,68 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout - evidence of what actually happened, independent of the summary rows returned by the list endpoint",
|
||||
"description": "Returns every visa/master/sber payout attempt of one order, newest first - one row per payment with whether it was paid (paid/gatewayStatus), the card it was paid from (cardholderName/maskedPan, once GBÜS reports them), its time (createdAt) and period (paymentPeriod). The raw GBÜS response of a row is at /payment-history/payments/{id}; the step-by-step logs are at /payment-history/{id}/logs.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"payment-history"
|
||||
],
|
||||
"summary": "List an order's payments",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Order ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/payment-history/{id}/logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Returns the full step-by-step audit trail (visa_master_payment_logs) recorded while processing an order's payout, newest first - evidence of what actually happened, independent of the summary rows returned by /payment-history/{id}",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -5452,7 +5513,10 @@
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/appresult.AppSuccess"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentLogDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
@@ -10085,6 +10149,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentLogDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"createdByName": {
|
||||
"type": "string"
|
||||
},
|
||||
"detail": {
|
||||
"type": "object"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"step": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymentsettings.PaymentSettingsDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1484,6 +1484,23 @@ definitions:
|
||||
userId:
|
||||
type: integer
|
||||
type: object
|
||||
paymenthistory.PaymentLogDTO:
|
||||
properties:
|
||||
createdAt:
|
||||
type: string
|
||||
createdById:
|
||||
type: integer
|
||||
createdByName:
|
||||
type: string
|
||||
detail:
|
||||
type: object
|
||||
id:
|
||||
type: integer
|
||||
orderId:
|
||||
type: integer
|
||||
step:
|
||||
type: string
|
||||
type: object
|
||||
paymentsettings.PaymentSettingsDTO:
|
||||
properties:
|
||||
bankFeeTmt:
|
||||
@@ -5563,9 +5580,11 @@ paths:
|
||||
- payment-history
|
||||
/payment-history/{id}:
|
||||
get:
|
||||
description: Returns the full step-by-step audit trail (visa_master_payment_logs)
|
||||
recorded while processing an order's payout - evidence of what actually happened,
|
||||
independent of the summary rows returned by the list endpoint
|
||||
description: Returns every visa/master/sber payout attempt of one order, newest
|
||||
first - one row per payment with whether it was paid (paid/gatewayStatus),
|
||||
the card it was paid from (cardholderName/maskedPan, once GBÜS reports them),
|
||||
its time (createdAt) and period (paymentPeriod). The raw GBÜS response of
|
||||
a row is at /payment-history/payments/{id}; the step-by-step logs are at /payment-history/{id}/logs.
|
||||
parameters:
|
||||
- description: Order ID
|
||||
in: path
|
||||
@@ -5578,7 +5597,50 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppSuccess'
|
||||
items:
|
||||
$ref: '#/definitions/paymenthistory.PaymentHistoryItemDTO'
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"403":
|
||||
description: Forbidden
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: List an order's payments
|
||||
tags:
|
||||
- payment-history
|
||||
/payment-history/{id}/logs:
|
||||
get:
|
||||
description: Returns the full step-by-step audit trail (visa_master_payment_logs)
|
||||
recorded while processing an order's payout, newest first - evidence of what
|
||||
actually happened, independent of the summary rows returned by /payment-history/{id}
|
||||
parameters:
|
||||
- description: Order ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/paymenthistory.PaymentLogDTO'
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
|
||||
Reference in New Issue
Block a user