add pay
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

This commit is contained in:
2026-09-19 03:54:40 +05:00
parent 848a07324f
commit 6c7c402390
16 changed files with 891 additions and 324 deletions

View File

@@ -7110,6 +7110,35 @@ const docTemplate = `{
}
}
},
"/visa-master-payment-orders/callback": {
"get": {
"description": "GBÜS redirects the browser here after payment; the real outcome is verified server-to-server before anything is finalized",
"produces": [
"text/html"
],
"tags": [
"visa-master-payment-orders"
],
"summary": "GBÜS payment callback",
"parameters": [
{
"type": "integer",
"description": "Payment attempt ID",
"name": "paymentId",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "html",
"schema": {
"type": "string"
}
}
}
}
},
"/visa-master-payment-orders/{id}": {
"get": {
"security": [
@@ -7281,7 +7310,7 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "Charges the payment gateway and marks the order paid on success",
"description": "Registers the payment with GBÜS and returns the hosted-payment-page URL to complete it on. The final outcome is only known once GBÜS redirects back to the callback, which verifies and finalizes it.",
"consumes": [
"application/json"
],
@@ -7291,7 +7320,7 @@ const docTemplate = `{
"tags": [
"visa-master-payment-orders"
],
"summary": "Pay out a visa/master/sber order",
"summary": "Start a visa/master/sber payout",
"parameters": [
{
"type": "integer",
@@ -7314,7 +7343,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentResultDTO"
"$ref": "#/definitions/visamasterpay.PaymentInitResultDTO"
}
},
"400": {
@@ -9843,6 +9872,17 @@ const docTemplate = `{
}
}
},
"visamasterpay.PaymentInitResultDTO": {
"type": "object",
"properties": {
"formUrl": {
"type": "string"
},
"paymentId": {
"type": "integer"
}
}
},
"visamasterpay.PaymentQuoteDTO": {
"type": "object",
"properties": {
@@ -9871,59 +9911,6 @@ const docTemplate = `{
"type": "string"
}
}
},
"visamasterpay.PaymentResultDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"amountUsd": {
"type": "number"
},
"bankFeeTmt": {
"type": "number"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gatewayReference": {
"type": "string"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"orderId": {
"type": "integer"
},
"paid": {
"type": "boolean"
},
"paidAt": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
}
}
}
},
"securityDefinitions": {

View File

@@ -7104,6 +7104,35 @@
}
}
},
"/visa-master-payment-orders/callback": {
"get": {
"description": "GBÜS redirects the browser here after payment; the real outcome is verified server-to-server before anything is finalized",
"produces": [
"text/html"
],
"tags": [
"visa-master-payment-orders"
],
"summary": "GBÜS payment callback",
"parameters": [
{
"type": "integer",
"description": "Payment attempt ID",
"name": "paymentId",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "html",
"schema": {
"type": "string"
}
}
}
}
},
"/visa-master-payment-orders/{id}": {
"get": {
"security": [
@@ -7275,7 +7304,7 @@
"BearerAuth": []
}
],
"description": "Charges the payment gateway and marks the order paid on success",
"description": "Registers the payment with GBÜS and returns the hosted-payment-page URL to complete it on. The final outcome is only known once GBÜS redirects back to the callback, which verifies and finalizes it.",
"consumes": [
"application/json"
],
@@ -7285,7 +7314,7 @@
"tags": [
"visa-master-payment-orders"
],
"summary": "Pay out a visa/master/sber order",
"summary": "Start a visa/master/sber payout",
"parameters": [
{
"type": "integer",
@@ -7308,7 +7337,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentResultDTO"
"$ref": "#/definitions/visamasterpay.PaymentInitResultDTO"
}
},
"400": {
@@ -9837,6 +9866,17 @@
}
}
},
"visamasterpay.PaymentInitResultDTO": {
"type": "object",
"properties": {
"formUrl": {
"type": "string"
},
"paymentId": {
"type": "integer"
}
}
},
"visamasterpay.PaymentQuoteDTO": {
"type": "object",
"properties": {
@@ -9865,59 +9905,6 @@
"type": "string"
}
}
},
"visamasterpay.PaymentResultDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"amountUsd": {
"type": "number"
},
"bankFeeTmt": {
"type": "number"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gatewayReference": {
"type": "string"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"orderId": {
"type": "integer"
},
"paid": {
"type": "boolean"
},
"paidAt": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
}
}
}
},
"securityDefinitions": {

View File

@@ -1695,6 +1695,13 @@ definitions:
format: date
type: string
type: object
visamasterpay.PaymentInitResultDTO:
properties:
formUrl:
type: string
paymentId:
type: integer
type: object
visamasterpay.PaymentQuoteDTO:
properties:
bankFeeTmt:
@@ -1714,41 +1721,6 @@ definitions:
type:
type: string
type: object
visamasterpay.PaymentResultDTO:
properties:
amountTmt:
type: number
amountUsd:
type: number
bankFeeTmt:
type: number
exchangeRateRub:
type: number
exchangeRateUsd:
type: number
gatewayReference:
type: string
gatewayStatus:
type: string
gbusFeeTmt:
type: number
orderId:
type: integer
paid:
type: boolean
paidAt:
type: string
paymentPeriod:
type: string
totalAmountTmt:
type: number
tvebFeeTmt:
type: number
tvebFeeUsd:
type: number
type:
type: string
type: object
host: localhost:5005
info:
contact: {}
@@ -6429,7 +6401,9 @@ paths:
post:
consumes:
- application/json
description: Charges the payment gateway and marks the order paid on success
description: Registers the payment with GBÜS and returns the hosted-payment-page
URL to complete it on. The final outcome is only known once GBÜS redirects
back to the callback, which verifies and finalizes it.
parameters:
- description: Visa/master payment order ID
in: path
@@ -6448,7 +6422,7 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/visamasterpay.PaymentResultDTO'
$ref: '#/definitions/visamasterpay.PaymentInitResultDTO'
"400":
description: Bad Request
schema:
@@ -6463,7 +6437,7 @@ paths:
$ref: '#/definitions/appresult.AppError'
security:
- BearerAuth: []
summary: Pay out a visa/master/sber order
summary: Start a visa/master/sber payout
tags:
- visa-master-payment-orders
/visa-master-payment-orders/{id}/quote:
@@ -6500,6 +6474,26 @@ paths:
summary: Quote a visa/master/sber payment
tags:
- visa-master-payment-orders
/visa-master-payment-orders/callback:
get:
description: GBÜS redirects the browser here after payment; the real outcome
is verified server-to-server before anything is finalized
parameters:
- description: Payment attempt ID
in: query
name: paymentId
required: true
type: integer
produces:
- text/html
responses:
"200":
description: html
schema:
type: string
summary: GBÜS payment callback
tags:
- visa-master-payment-orders
securityDefinitions:
BearerAuth:
in: header