Documentation ¶
Index ¶
- Constants
- func GetEnv(env common.Environment) checkout.SupportedEnvironment
- type AVSResponseCode
- type CVVResponseCode
- type CheckoutComClient
- func (client *CheckoutComClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *CheckoutComClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *CheckoutComClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *CheckoutComClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
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" 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" )
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 ¶
func (client *CheckoutComClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
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
Click to show internal directories.
Click to hide internal directories.