adyen

package
v1.0.325 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdyenEnvironment added in v1.0.317

func AdyenEnvironment(environment common.Environment) adyen_common.Environment

Types

type AVSResponse added in v1.0.317

type AVSResponse string
const (
	AVSResponse0  AVSResponse = "0 Unknown"
	AVSResponse1  AVSResponse = "1 Address matches, postal code doesn't"
	AVSResponse2  AVSResponse = "2 Neither postal code nor address match"
	AVSResponse3  AVSResponse = "3 AVS unavailable"
	AVSResponse4  AVSResponse = "4 AVS not supported for this card type"
	AVSResponse5  AVSResponse = "5 No AVS data provided"
	AVSResponse6  AVSResponse = "6 Postal code matches, but the address does not match"
	AVSResponse7  AVSResponse = "7 Both postal code and address match"
	AVSResponse8  AVSResponse = "8 Address not checked, postal code unknown"
	AVSResponse9  AVSResponse = "9 Address matches, postal code unknown"
	AVSResponse10 AVSResponse = "10 Address doesn't match, postal code unknown"
	AVSResponse11 AVSResponse = "11 Postal code not checked, address unknown"
	AVSResponse12 AVSResponse = "12 Address matches, postal code not checked"
	AVSResponse13 AVSResponse = "13 Address doesn't match, postal code not checked"
	AVSResponse14 AVSResponse = "14 Postal code matches, address unknown"
	AVSResponse15 AVSResponse = "15 Postal code matches, address not checked"
	AVSResponse16 AVSResponse = "16 Postal code doesn't match, address unknown"
	AVSResponse17 AVSResponse = "17 Postal code doesn't match, address not checked."
	AVSResponse18 AVSResponse = "18 Neither postal code nor address were checked"
	AVSResponse19 AVSResponse = "19 Name and postal code matches"
	AVSResponse20 AVSResponse = "20 Name, address and postal code matches"
	AVSResponse21 AVSResponse = "21 Name and address matches"
	AVSResponse22 AVSResponse = "22 Name matches"
	AVSResponse23 AVSResponse = "23 Postal code matches, name doesn't match"
	AVSResponse24 AVSResponse = "24 Both postal code and address matches, name doesn't match"
	AVSResponse25 AVSResponse = "25 Address matches, name doesn't match"
	AVSResponse26 AVSResponse = "26 Neither postal code, address nor name matches"
)

avsResponse hard-coded for easy comparison checking later

type AdyenClient

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

AdyenClient represents the authentication fields needed to make API Requests for a given environment Client functions return error for http error and will return Success=true if action is performed successfully You can create new API user there: https://ca-test.adyen.com/ca/ca/config/users.shtml

func NewClient

func NewClient(env common.Environment, username string, merchantAccount string, password string) *AdyenClient

NewClient creates an Adyen client with creds and default http client

func NewWithHTTPClient

func NewWithHTTPClient(env common.Environment, username string, merchantAccount string, password string, httpClient *http.Client) *AdyenClient

NewWithHTTPClient creates an Adyen client with creds and user specified http client for custom behavior

func (*AdyenClient) Authorize

func (client *AdyenClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)

Authorize through Adyen gateway. This transaction must be captured for funds to be received

func (*AdyenClient) Capture

func (client *AdyenClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)

Capture an existing transaction by reference

func (*AdyenClient) Refund

func (client *AdyenClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)

Refund a captured transaction by reference with specified amount

func (*AdyenClient) Void

func (client *AdyenClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)

Void an authorized transaction (cancels the authorization)

type CVCResult added in v1.0.317

type CVCResult string

CVCResult represents the Adyen translation of CVC codes from issuer https://docs.adyen.com/development-resources/test-cards/cvc-cvv-result-testing

const (
	CVCResult0 CVCResult = "0 Unknown"
	CVCResult1 CVCResult = "1 Matches"
	CVCResult2 CVCResult = "2 Doesn't Match"
	CVCResult3 CVCResult = "3 Not Checked"
	CVCResult4 CVCResult = "4 No CVC/CVV provided, but was required"
	CVCResult5 CVCResult = "5 Issuer not certified for CVC/CVV"
	CVCResult6 CVCResult = "6 No CVC/CVV provided"
)

Constants represented by numerical code they are assigned

Jump to

Keyboard shortcuts

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