Files
sendico/api/pkg/model/payment_gateway.go
2026-02-03 00:40:46 +01:00

29 lines
1.7 KiB
Go

package model
import (
"github.com/tech/sendico/pkg/payments/rail"
paymenttypes "github.com/tech/sendico/pkg/payments/types"
)
type PaymentGatewayIntent struct {
PaymentRef string `bson:"paymentRef,omitempty" json:"payment_ref,omitempty"`
PaymentIntentID string `bson:"paymentIntentId,omitempty" json:"payment_intent_id,omitempty"`
IdempotencyKey string `bson:"idempotencyKey,omitempty" json:"idempotency_key,omitempty"`
OutgoingLeg string `bson:"outgoingLeg,omitempty" json:"outgoing_leg,omitempty"`
QuoteRef string `bson:"quoteRef,omitempty" json:"quote_ref,omitempty"`
IntentRef string `bson:"intentRef,omitempty" json:"intent_ref,omitempty"`
OperationRef string `bson:"operationRef,omitempty" json:"operation_ref,omitempty"`
RequestedMoney *paymenttypes.Money `bson:"requestedMoney,omitempty" json:"requested_money,omitempty"`
}
type PaymentGatewayExecution struct {
PaymentIntentID string `bson:"paymentIntentId,omitempty" json:"payment_intent_id,omitempty"`
PaymentRef string `bson:"paymentRef,omitempty" json:"payment_ref,omitempty"`
IdempotencyKey string `bson:"idempotencyKey,omitempty" json:"idempotency_key,omitempty"`
ExecutedMoney *paymenttypes.Money `bson:"executedMoney,omitempty" json:"executed_money,omitempty"`
Status rail.OperationResult `bson:"status,omitempty" json:"status,omitempty"`
OperationRef string `bson:"operationRef,omitempty" json:"operation_ref,omitempty"`
TransferRef string `bson:"transferRef,omitempty" json:"transfer_ref,omitempty"`
Error string `bson:"error,omitempty" json:"error,omitempty"`
}