payment-history: GET /{id}/gateway - all of an order's payments with their HALKBANK JSON
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

The gateway view now takes an order ID and returns every payment of the
order, newest first, each in the same PaymentGatewayDTO shape with its
own last stored GBÜS response. It moves from /payments/{id}/gateway to
/{id}/gateway, next to the other order-scoped routes (/{id}, /{id}/logs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 20:05:18 +05:00
parent ef3a1baee2
commit a3cbb52f4b
7 changed files with 182 additions and 118 deletions

View File

@@ -5424,25 +5424,25 @@
}
}
},
"/payment-history/payments/{id}/gateway": {
"/payment-history/{id}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns one payment the way the per-order payment table shows it - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"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}, of every row at once at /payment-history/{id}/gateway; the step-by-step logs are at /payment-history/{id}/logs.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Get a payment with its HALKBANK response",
"summary": "List an order's payments",
"parameters": [
{
"type": "integer",
"description": "Payment ID",
"description": "Order ID",
"name": "id",
"in": "path",
"required": true
@@ -5452,7 +5452,10 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
}
}
},
"400": {
@@ -5482,21 +5485,21 @@
}
}
},
"/payment-history/{id}": {
"/payment-history/{id}/gateway": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"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.",
"description": "Returns every payment of one order, newest first, the way the per-order payment table shows them - paid or not, the card it was paid from (cardholderName/maskedPan, null until GBÜS reports them), its time (createdAt), payment year/month, amounts and reference (orderNumber) - each together with the last GBÜS (HALKBANK) response stored for it (gatewayResponse, null if GBÜS never answered). Backs the table's storage icon.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "List an order's payments",
"summary": "List an order's payments with their HALKBANK responses",
"parameters": [
{
"type": "integer",
@@ -5512,7 +5515,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentHistoryItemDTO"
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
}
}
},