The status check now carries GBÜS's last stored response for the
attempt alongside gatewayStatus - the fresh getOrderStatusExtended.do
answer when it was just checked, the stored one when the attempt was
already finalized, null if GBÜS never answered. The callback is
unchanged: it is public and only reports paid plus a message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both routes served the same handler and took an order ID, while
/payments/{id} takes a payment ID - so the /payments/ one read as
per-payment and showed up twice in Swagger. /payment-history/{id}/gateway
is the one to use.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
visa-master-payment-orders mixed order CRUD with the GBÜS payment flow;
they are now visa-master-orders and visa-master-payment. payment-history
summaries, descriptions and params are in Turkmen with one shape
(what it returns, Tertip, Bellik), and its tag description lists the
endpoints in the order they are used.
@securityDefinitions.apikey moves to the end of the general info block:
swag read every line after it as its attributes, so @schemes and all
@tag.* declarations were silently dropped from the spec.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A status check that ran before the card was entered (orderStatus 0,
"no payment attempts") finalized the payment as failed, and later
callbacks returned it as already finalized without asking GBÜS again -
so cardholderName/maskedPan stayed null and a real payment was never
recorded. Unpaid in-progress statuses (0, 1, 5) now keep the row
pending with the latest response stored, and rows already failed that
way are re-checked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appresult.Localize applies to all /api/admin routes, so each handler's
godoc now declares lang (tm, ru, en, all; default tm) and Swagger UI
offers it as a dropdown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
auth, user, userbranch and org/branches each declared their own identical
{en, ru, tm} struct; they now use shared.LocalizedText. No JSON change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
appresult.Localize, the first admin middleware, rewrites JSON responses so
every {en, ru, tm} object becomes the plain string for ?lang= (tm, ru, en;
default tm), falling back tm -> ru -> en when that translation is empty.
?lang=all keeps the full objects for edit forms; other values are 400.
Key order and number precision are preserved; non-JSON responses and
/swagger are untouched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
The frontend still calls the single-payment gateway view, so it's back
as it was (payment ID -> one PaymentGatewayDTO), alongside the new
order-wide /{id}/gateway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
To match the old online payment history page:
- apiClientName: billing_visa_master_username / billing_sber_username
- formUrl falls back to the logged register.do response, so finalized
attempts keep it; successUrl is the returnUrl logged with register.do
- callbackStatus ("received") and callbackAt from the attempt's first
callback_received log
- index visa_master_payment_logs (order_id, step) for those lookups
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
- GET /payment-history/payments/{id}: single payment attempt with the raw
gateway_response (last HALKBANK JSON) for the "storage" icon modal
- GET /payment-history: sort (id/created_at/status/amount) and order
(asc/desc, default desc) query params
- GET /payment-history/{id}: order logs now newest first
- index on visa_master_order_payments (gateway_status, id DESC)
- regenerate swagger docs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>