payment-history: GET /payments/{id}/gateway - one payment with its HALKBANK JSON
Returns a payment the way the per-order payment table shows it (paid, cardholder name, masked card, time, payment year/month, USD/TMT amounts, reference) plus the last stored GBÜS response, for the storage icon. Card fields and gatewayResponse are null until GBÜS reports them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
102
docs/docs.go
102
docs/docs.go
@@ -5430,6 +5430,64 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/payment-history/payments/{id}/gateway": {
|
||||
"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.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"payment-history"
|
||||
],
|
||||
"summary": "Get a payment with its HALKBANK response",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Payment ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
|
||||
}
|
||||
},
|
||||
"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}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -9928,6 +9986,50 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentGatewayDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amountTmt": {
|
||||
"type": "number"
|
||||
},
|
||||
"amountUsd": {
|
||||
"type": "number"
|
||||
},
|
||||
"cardholderName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"gatewayResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"gatewayStatus": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"maskedPan": {
|
||||
"type": "string"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"paid": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"paymentMonth": {
|
||||
"type": "integer"
|
||||
},
|
||||
"paymentYear": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentHistoryDetailDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -5424,6 +5424,64 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/payment-history/payments/{id}/gateway": {
|
||||
"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.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"payment-history"
|
||||
],
|
||||
"summary": "Get a payment with its HALKBANK response",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Payment ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
|
||||
}
|
||||
},
|
||||
"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}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -9922,6 +9980,50 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentGatewayDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amountTmt": {
|
||||
"type": "number"
|
||||
},
|
||||
"amountUsd": {
|
||||
"type": "number"
|
||||
},
|
||||
"cardholderName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"gatewayResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"gatewayStatus": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"maskedPan": {
|
||||
"type": "string"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderNumber": {
|
||||
"type": "string"
|
||||
},
|
||||
"paid": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"paymentMonth": {
|
||||
"type": "integer"
|
||||
},
|
||||
"paymentYear": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"paymenthistory.PaymentHistoryDetailDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1304,6 +1304,35 @@ definitions:
|
||||
$ref: '#/definitions/paymenthistory.PaymentHistoryItemDTO'
|
||||
type: array
|
||||
type: object
|
||||
paymenthistory.PaymentGatewayDTO:
|
||||
properties:
|
||||
amountTmt:
|
||||
type: number
|
||||
amountUsd:
|
||||
type: number
|
||||
cardholderName:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
gatewayResponse:
|
||||
type: object
|
||||
gatewayStatus:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
maskedPan:
|
||||
type: string
|
||||
orderId:
|
||||
type: integer
|
||||
orderNumber:
|
||||
type: string
|
||||
paid:
|
||||
type: boolean
|
||||
paymentMonth:
|
||||
type: integer
|
||||
paymentYear:
|
||||
type: integer
|
||||
type: object
|
||||
paymenthistory.PaymentHistoryDetailDTO:
|
||||
properties:
|
||||
amountMinor:
|
||||
@@ -5701,6 +5730,48 @@ paths:
|
||||
summary: Get a single payment attempt
|
||||
tags:
|
||||
- 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). Backs the table's
|
||||
storage icon.
|
||||
parameters:
|
||||
- description: Payment ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/paymenthistory.PaymentGatewayDTO'
|
||||
"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: Get a payment with its HALKBANK response
|
||||
tags:
|
||||
- payment-history
|
||||
/payment-settings:
|
||||
get:
|
||||
description: Returns the admin-configurable bank and GBÜS commission fees used
|
||||
|
||||
Reference in New Issue
Block a user