checkoutcom

package
v1.1.1002 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AcceptedStatusCode = 202

Variables

This section is empty.

Functions

This section is empty.

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(apiKey string) *CheckoutComClient

NewClient creates a CheckoutComClient Note: the environment is indicated by the apiKey. See "isSandbox" assignment in checkout.Create.

func NewWithHTTPClient

func NewWithHTTPClient(apiKey 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