gateways

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPosReqDT

func GetPosReqDT() string

func GetToken

func GetToken(paymentMethod abstractions.IPaymentMethod) string

func IsAppleOrGooglePay

func IsAppleOrGooglePay(paymentDataSource entities.PaymentDataSourceType) bool

func MapReportResponse

func MapReportResponse(rawResponse string, reportType reporttype.ReportType) (abstractions4.ITransaction, error)

func MapResponse

func MapResponse(rawResponse string, paymentMethod abstractions.IPaymentMethod) (*transactions.Transaction, error)

Types

type Gateway

type Gateway struct {
	ContentType            string
	EnableLogging          bool
	RequestLogger          logging.IRequestLogger
	LogEntry               strings.Builder
	LSChar                 string
	Headers                map[string]string
	DynamicHeaders         map[string]string
	Timeout                int
	ServiceUrl             string
	AuthorizationHeaderKey string
	WebProxy               abstractions.IWebProxy
}

func NewGateway

func NewGateway(contentType string) *Gateway

func (*Gateway) BuildQueryString

func (g *Gateway) BuildQueryString(queryStringParams map[string]string) string

func (*Gateway) GenerateRequestLog

func (g *Gateway) GenerateRequestLog()

func (*Gateway) GenerateResponseLog

func (g *Gateway) GenerateResponseLog()

func (*Gateway) GetRawResponse

func (g *Gateway) GetRawResponse(responseStream *http.Response) (string, error)

func (*Gateway) SendRequest

func (g *Gateway) SendRequest(ctx context.Context, verb string, endpoint string, data string, queryStringParams map[string]string) (*GatewayResponse, error)

func (*Gateway) SendRequestWithMultipart

func (g *Gateway) SendRequestWithMultipart(endpoint string, content *multipart.Writer, body bytes.Buffer) (*GatewayResponse, error)

type GatewayResponse

type GatewayResponse struct {
	StatusCode  int
	RawResponse string
}

func (*GatewayResponse) GetRawResponse

func (g *GatewayResponse) GetRawResponse() string

func (*GatewayResponse) GetStatusCode

func (g *GatewayResponse) GetStatusCode() int

func (*GatewayResponse) SetRawResponse

func (g *GatewayResponse) SetRawResponse(rawResponse string)

func (*GatewayResponse) SetStatusCode

func (g *GatewayResponse) SetStatusCode(statusCode int)

type GatewayResponseError

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

func NewGatewayResponseError

func NewGatewayResponseError(msg string, errorCode string) *GatewayResponseError

func (*GatewayResponseError) Error

func (e *GatewayResponseError) Error() string

Error implements the error interface.

func (*GatewayResponseError) GetErrorCode

func (e *GatewayResponseError) GetErrorCode() string

type PorticoConnector

type PorticoConnector struct {
	*XmlGateway
	SiteId             string
	LicenseId          string
	DeviceId           string
	Username           string
	Password           string
	DeveloperId        string
	VersionNumber      string
	SecretApiKey       string
	SdkNameVersion     string
	CardType           string
	IsSAFDataSupported bool
}

func NewPorticoConnector

func NewPorticoConnector() *PorticoConnector

func (*PorticoConnector) BuildEnvelope

func (p *PorticoConnector) BuildEnvelope(et *utils.ElementTree, transaction *utils.Element, clientTransactionId string) (string, error)

func (*PorticoConnector) ManageTransaction

func (*PorticoConnector) ProcessAuthorization

func (*PorticoConnector) ProcessReport

func (*PorticoConnector) SendKeepAlive

func (*PorticoConnector) SerializeRequest

func (*PorticoConnector) SupportsHostedPayments

func (p *PorticoConnector) SupportsHostedPayments() bool

func (*PorticoConnector) SupportsOpenBanking

func (p *PorticoConnector) SupportsOpenBanking() bool

type XmlGateway

type XmlGateway struct {
	*Gateway
}

func NewXmlGateway

func NewXmlGateway() *XmlGateway

func (*XmlGateway) DoTransaction

func (x *XmlGateway) DoTransaction(ctx context.Context, request string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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