Files
GuwandykA a3cbb52f4b
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
payment-history: GET /{id}/gateway - all of an order's payments with their HALKBANK JSON
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>
2026-10-24 20:05:18 +05:00

21 lines
1.0 KiB
Go

package paymenthistory
import "context"
type Repository interface {
List(ctx context.Context, filter ListFilter) (ListPaymentHistoryDTO, error)
// Get returns a single payout attempt by its visa_master_order_payments id.
Get(ctx context.Context, paymentID int64) (PaymentHistoryDetailDTO, error)
// OrderPayments returns every payout attempt of a single order, newest
// first - the per-order payment table, without paging.
OrderPayments(ctx context.Context, orderID int64) ([]PaymentHistoryItemDTO, error)
// OrderPaymentDetails is OrderPayments with each attempt's raw GBÜS
// response kept alongside it.
OrderPaymentDetails(ctx context.Context, orderID int64) ([]PaymentHistoryDetailDTO, error)
// Logs returns the full visa_master_payment_logs audit trail for a
// single order, newest first.
Logs(ctx context.Context, orderID int64) ([]PaymentLogDTO, error)
// OwnerInfo returns an order's owning user/branch, for rbac.GuardOrder.
OwnerInfo(ctx context.Context, orderID int64) (*int64, int64, error)
}