checkoutcom

package
v1.1.1230 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AcceptedStatusCode = 202

Variables

This section is empty.

Functions

func GetEnv added in v1.1.1060

func GetEnv(env common.Environment) checkout.SupportedEnvironment

Types

type AVSResponseCode

type AVSResponseCode string
const (
	AVSResponseStreetMatch                                 AVSResponseCode = "A"
	AVSResponseStreetMatchPostalUnverified                 AVSResponseCode = "B"
	AVSResponseStreetAndPostalUnverified                   AVSResponseCode = "C"
	AVSResponseStreetAndPostalMatch                        AVSResponseCode = "D"
	AVSResponseAddressMatchError                           AVSResponseCode = "E"
	AVSResponseStreetAndPostalMatchUK                      AVSResponseCode = "F"
	AVSResponseNotVerifiedOrNotSupported                   AVSResponseCode = "G"
	AVSResponseAddressUnverified                           AVSResponseCode = "I"
	AVSResponseStreetAndPostalMatchMIntl                   AVSResponseCode = "M"
	AVSResponseNoAddressMatch                              AVSResponseCode = "N"
	AVSResponseAVSNotRequested                             AVSResponseCode = "O"
	AVSResponseStreetUnverifiedPostalMatch                 AVSResponseCode = "P"
	AVSResponseAVSUnavailable                              AVSResponseCode = "R"
	AVSResponseAVSUnsupported                              AVSResponseCode = "S"
	AVSResponseMatchNotCapable                             AVSResponseCode = "U"
	AVSResponseNineDigitPostalMatch                        AVSResponseCode = "W"
	AVSResponseStreetAndNineDigitPostalMatch               AVSResponseCode = "X"
	AVSResponseStreetAndFiveDigitPostalMatch               AVSResponseCode = "Y"
	AVSResponseFiveDigitPostalMatch                        AVSResponseCode = "Z"
	AVSResponseCardholderNameIncorrectPostalMatch          AVSResponseCode = "AE1"
	AVSResponseCardholderNameIncorrectStreetAndPostalMatch AVSResponseCode = "AE2"
	AVSResponseCardholderNameIncorrectStreetMatch          AVSResponseCode = "AE3"
	AVSResponseCardholderNameMatch                         AVSResponseCode = "AE4"
	AVSResponseCardholderNameAndPostalMatch                AVSResponseCode = "AE5"
	AVSResponseCardholderNameAndStreetAndPostalMatch       AVSResponseCode = "AE6"
	AVSResponseCardholderNameAndStreetMatch                AVSResponseCode = "AE7"
)

See https://www.checkout.com/docs/resources/codes/avs-codes

type CVVResponseCode

type CVVResponseCode string
const (
	CVVResponseNotPresent    CVVResponseCode = "X"
	CVVResponseNotConfigured CVVResponseCode = "U"
	CVVResponseCVDMissing    CVVResponseCode = "P"
	CVVResponseMatched       CVVResponseCode = "Y"
	CVVResponseNotValid      CVVResponseCode = "D"
	CVVResponseFailed        CVVResponseCode = "N"
)

See https://www.checkout.com/docs/resources/codes/cvv-response-codes

type CheckoutComClient

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

checkoutomClient uses API-Key and custom http client to make http calls

func NewClient

func NewClient(env common.Environment, apiKey string, processingChannelId *string) *CheckoutComClient

NewClient creates a CheckoutComClient Note: PCID is optional to support legacy checkout.com merchants whose PCID is linked to their API key. New merchants will need to provide their PCID or ask their checkout.com rep to disable the field requirement.

func NewWithHTTPClient

func NewWithHTTPClient(env common.Environment, apiKey string, processingChannelId *string, httpClient *http.Client) *CheckoutComClient

NewWithHTTPClient uses a custom http client for requests

func (*CheckoutComClient) Authorize

Authorize a transaction for specified amount

func (*CheckoutComClient) Capture

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

Capture an authorized transaction by charge ID

func (*CheckoutComClient) Refund

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

Refund a captured transaction with amount and charge ID

func (*CheckoutComClient) Void

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

Void an authorized transaction with charge ID

Jump to

Keyboard shortcuts

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