payment-history: /{id} lists the order's payments, logs move to /{id}/logs
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

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:
2026-10-24 18:38:02 +05:00
parent a715cd23ea
commit c209f338c2
7 changed files with 319 additions and 14 deletions

View File

@@ -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": {