payment-history: /payments/{id}/gateway takes an order ID and lists its payments
The frontend calls /payments/{id}/gateway with an order ID, so that URL
now returns every payment of the order (newest first, each with its
HALKBANK JSON) instead of one payment by payment ID. /{id}/gateway stays
as an alias of the same handler.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
11
docs/docs.go
11
docs/docs.go
@@ -5437,18 +5437,18 @@ const docTemplate = `{
|
||||
"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). Every payment of an order at once is at /payment-history/{id}/gateway.",
|
||||
"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": "Get a payment with its HALKBANK response",
|
||||
"summary": "List an order's payments with their HALKBANK responses",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Payment ID",
|
||||
"description": "Order ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
@@ -5458,7 +5458,10 @@ const docTemplate = `{
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
|
||||
@@ -5431,18 +5431,18 @@
|
||||
"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). Every payment of an order at once is at /payment-history/{id}/gateway.",
|
||||
"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": "Get a payment with its HALKBANK response",
|
||||
"summary": "List an order's payments with their HALKBANK responses",
|
||||
"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.PaymentGatewayDTO"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
|
||||
@@ -5799,14 +5799,14 @@ paths:
|
||||
- payment-history
|
||||
/payment-history/payments/{id}/gateway:
|
||||
get:
|
||||
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). Every payment
|
||||
of an order at once is at /payment-history/{id}/gateway.
|
||||
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.
|
||||
parameters:
|
||||
- description: Payment ID
|
||||
- description: Order ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
@@ -5817,7 +5817,9 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/paymenthistory.PaymentGatewayDTO'
|
||||
items:
|
||||
$ref: '#/definitions/paymenthistory.PaymentGatewayDTO'
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
@@ -5836,7 +5838,7 @@ paths:
|
||||
$ref: '#/definitions/appresult.AppError'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Get a payment with its HALKBANK response
|
||||
summary: List an order's payments with their HALKBANK responses
|
||||
tags:
|
||||
- payment-history
|
||||
/payment-settings:
|
||||
|
||||
Reference in New Issue
Block a user