Documentation ¶
Index ¶
- Constants
- 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 ¶
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" 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(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 ¶
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.