Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckStatusError ¶
type CheckStatusError struct {
// contains filtered or unexported fields
}
CheckStatusError represents an error type specific to checking status.
func NewCheckStatusError ¶
func NewCheckStatusError(msg string, err error) *CheckStatusError
NewCheckStatusError creates a new CheckStatusError instance with the given message and underlying error.
func (*CheckStatusError) Error ¶
func (e *CheckStatusError) Error() string
type CreatePaymentError ¶
type CreatePaymentError struct {
// contains filtered or unexported fields
}
CreatePaymentError represents an error type specific to creating payments.
func NewCreatePaymentError ¶
func NewCreatePaymentError(msg string, err error) *CreatePaymentError
NewCreatePaymentError creates a new CreatePaymentError instance with the given message and underlying error.
func (*CreatePaymentError) Error ¶
func (e *CreatePaymentError) Error() string
type CreationGatewayError ¶
type CreationGatewayError struct {
// contains filtered or unexported fields
}
GatewayError represents a gateway error type with a specific message and underlying error.
func NewCreationGatewayError ¶
func NewCreationGatewayError(msg string, err error) *CreationGatewayError
NewCreationGatewayError creates a new GatewayError instance with the given message and underlying error.
func (*CreationGatewayError) Error ¶
func (e *CreationGatewayError) Error() string
type PaymentGateway ¶
type PaymentGateway interface { CreatePayment(context.Context) (string, error) CheckStatus(context.Context, string) (PaymentStatus, error) TransactionID() string Timeout() time.Duration Retries() int }
PaymentGateway is an interface that defines operations for a payment gateway.
type PaymentStatus ¶
type PaymentStatus int
PaymentStatus represents the status of a payment.
const ( Undefined PaymentStatus = iota Pending Succeeded Cancelled )
type TransactionInfo ¶
TransactionInfo holds information about a transaction.