api

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2025 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(config *ServicesConfig) error

func ConfigureService

func ConfigureService(config apiabstractions.IConfiguration, configName string) error

func ConfigureWithConfigName

func ConfigureWithConfigName(config *ServicesConfig, configName string) error

func ExecuteGateway added in v1.1.2

func ExecuteGatewayWithName added in v1.1.2

func ExecuteGatewayWithName[T abstractions.ITransaction](ctx context.Context, name string, gw abstractions.ExecutableGateway) (*T, error)

func ExecuteTerminalWithContext added in v1.1.2

func ExecuteTerminalWithContext(ctx context.Context, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)

func ExecuteTerminalWithName

func ExecuteTerminalWithName(name string, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)

func ExecuteTerminalWithNameAndContext added in v1.1.2

func ExecuteTerminalWithNameAndContext(ctx context.Context, name string, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)

func ExecuteTimeoutReversibleGateway added in v1.1.2

func ExecuteTimeoutReversibleGateway(ctx context.Context, gw ReversibleGateway) (*transactions.Transaction, error)

func ExecuteTimeoutReversibleGatewayWithName added in v1.1.2

func ExecuteTimeoutReversibleGatewayWithName(ctx context.Context, name string, gw ReversibleGateway) (*transactions.Transaction, error)

func LoadGateway added in v1.1.2

func LoadGateway() (abstractions.IPaymentGateway, error)

func LoadGatewayByName added in v1.1.2

func LoadGatewayByName(name string) (abstractions.IPaymentGateway, error)

func NewAutoReversalError added in v1.1.2

func NewAutoReversalError(msg string, err error) error

Types

type AutoReversalError added in v1.1.2

type AutoReversalError struct {
	// contains filtered or unexported fields
}

func (*AutoReversalError) Error added in v1.1.2

func (e *AutoReversalError) Error() string

Error implements the error interface.

func (*AutoReversalError) Unwrap added in v1.1.2

func (e *AutoReversalError) Unwrap() error

Unwrap returns the original error.

type ExecutableTerminal

type ExecutableTerminal interface {
	ExecuteWithName(ctx context.Context, name string, device builders.ITerminalBuilderDevice) (terminalresponse.ITerminalResponse, error)
}

type ReversibleGateway added in v1.1.2

type ReversibleGateway interface {
	abstractions.ExecutableGateway
	GetPaymentMethod() paymentmethods.IPaymentMethod
	GetAmount() *decimal.Decimal
	GetClientTransactionId() string
}

type ServicesConfig

type ServicesConfig struct {
	GatewayConfig          *serviceconfigs.GatewayConfig
	DeviceConnectionConfig *terminals.ConnectionConfig
}

func (*ServicesConfig) GetDeviceConnectionConfig

func (c *ServicesConfig) GetDeviceConnectionConfig() *terminals.ConnectionConfig

func (*ServicesConfig) GetGatewayConfig

func (c *ServicesConfig) GetGatewayConfig() *serviceconfigs.GatewayConfig

func (*ServicesConfig) SetDeviceConnectionConfig

func (c *ServicesConfig) SetDeviceConnectionConfig(deviceConnectionConfig *terminals.ConnectionConfig)

func (*ServicesConfig) SetGatewayConfig

func (c *ServicesConfig) SetGatewayConfig(gatewayConfig *serviceconfigs.GatewayConfig)

func (*ServicesConfig) SetTimeout

func (c *ServicesConfig) SetTimeout(timeout int)

func (*ServicesConfig) Validate

func (c *ServicesConfig) Validate() error

type ServicesContainer

type ServicesContainer struct {
	// contains filtered or unexported fields
}

func GetServiceContainerInstance

func GetServiceContainerInstance() *ServicesContainer

func (*ServicesContainer) Dispose

func (sc *ServicesContainer) Dispose()

func (*ServicesContainer) GetDeviceController

func (sc *ServicesContainer) GetDeviceController(configName string) (devicecontroller.IDeviceController, error)

func (*ServicesContainer) GetDeviceInterface

func (sc *ServicesContainer) GetDeviceInterface(configName string) (abstractions.IDeviceInterface, error)

func (*ServicesContainer) GetGateway added in v1.1.2

func (sc *ServicesContainer) GetGateway(configName string) (abstractions2.IPaymentGateway, error)

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL