Documentation
¶
Index ¶
- func Configure(config *ServicesConfig) error
- func ConfigureService(config apiabstractions.IConfiguration, configName string) error
- func ConfigureWithConfigName(config *ServicesConfig, configName string) error
- func ExecuteGateway[T abstractions.ITransaction](ctx context.Context, gw abstractions.ExecutableGateway) (*T, error)
- func ExecuteGatewayWithName[T abstractions.ITransaction](ctx context.Context, name string, gw abstractions.ExecutableGateway) (*T, error)
- func ExecuteTerminal(terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)
- func ExecuteTerminalWithContext(ctx context.Context, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)
- func ExecuteTerminalWithName(name string, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)
- func ExecuteTerminalWithNameAndContext(ctx context.Context, name string, terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, error)
- func ExecuteTimeoutReversibleGateway(ctx context.Context, gw ReversibleGateway) (*transactions.Transaction, error)
- func ExecuteTimeoutReversibleGatewayWithName(ctx context.Context, name string, gw ReversibleGateway) (*transactions.Transaction, error)
- func LoadGateway() (abstractions.IPaymentGateway, error)
- func LoadGatewayByName(name string) (abstractions.IPaymentGateway, error)
- func NewAutoReversalError(msg string, err error) error
- type AutoReversalError
- type ExecutableTerminal
- type ReversibleGateway
- type ServicesConfig
- func (c *ServicesConfig) GetDeviceConnectionConfig() *terminals.ConnectionConfig
- func (c *ServicesConfig) GetGatewayConfig() *serviceconfigs.GatewayConfig
- func (c *ServicesConfig) SetDeviceConnectionConfig(deviceConnectionConfig *terminals.ConnectionConfig)
- func (c *ServicesConfig) SetGatewayConfig(gatewayConfig *serviceconfigs.GatewayConfig)
- func (c *ServicesConfig) SetTimeout(timeout int)
- func (c *ServicesConfig) Validate() error
- type ServicesContainer
- func (sc *ServicesContainer) Dispose()
- func (sc *ServicesContainer) GetDeviceController(configName string) (devicecontroller.IDeviceController, error)
- func (sc *ServicesContainer) GetDeviceInterface(configName string) (abstractions.IDeviceInterface, error)
- func (sc *ServicesContainer) GetGateway(configName string) (abstractions2.IPaymentGateway, error)
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 ExecuteGateway[T abstractions.ITransaction](ctx context.Context, gw abstractions.ExecutableGateway) (*T, error)
func ExecuteGatewayWithName ¶ added in v1.1.2
func ExecuteGatewayWithName[T abstractions.ITransaction](ctx context.Context, name string, gw abstractions.ExecutableGateway) (*T, error)
func ExecuteTerminal ¶
func ExecuteTerminal(terminal ExecutableTerminal) (terminalresponse.ITerminalResponse, 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
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)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.