gateway

package
v0.0.0-...-609d05f Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway struct {
	DirectURL      string
	MerchantID     string
	MerchantSecret string
}

Gateway - container for the key information

func NewGateway

func NewGateway(directURL, merchantID, merchantSecret string) *Gateway

NewGateway - simple constructor

func (*Gateway) DirectRequest

func (g *Gateway) DirectRequest(fields url.Values) (url.Values, error)

DirectRequest - Perform a direct request (as opposed to Hosted) to the gateway server.

func (*Gateway) Sign

func (g *Gateway) Sign(fields url.Values, key string) string

Returns a signature calculated from the fields using the merchant's key. This must be consistent with the server's implementation

func (*Gateway) VerifyResponse

func (g *Gateway) VerifyResponse(responseFields url.Values, key string) bool

Jump to

Keyboard shortcuts

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