Documentation ¶
Index ¶
- func AmountToString(amount *Amount) string
- type AVSResponse
- type Amount
- type AuthorizationRequest
- type AuthorizationResponse
- type BillingAddress
- type CVVResponse
- type CaptureRequest
- type CaptureResponse
- type Client
- type CreditCard
- type Level3Data
- type LineItem
- type RefundRequest
- type RefundResponse
- type VoidRequest
- type VoidResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmountToString ¶
Convert string with floating point eg 12.34.
Types ¶
type AVSResponse ¶ added in v1.0.225
type AVSResponse int
AVSResponse represents a possible Address Verification System response.
const ( AVSResponseUnknown AVSResponse = iota // An unknown AVS response was returned by the processor. AVSResponseError // The AVS is unavailable due to a system error. AVSResponseUnsupported // The issuing bank does not support AVS. AVSResponseSkipped // Verification was not performed for this transaction. AVSResponseZip9MatchAddressMatch // 9-digit ZIP matches, street address matches. AVSResponseZip9MatchAddressNoMatch // 9-digit ZIP matches, street address doesn't match. AVSResponseZip5MatchAddressMatch // 5-digit ZIP matches, street address matches. AVSResponseZip5MatchAddressNoMatch // 5-digit ZIP matches, street address doesn't match. AVSresponseZipMatchAddressMatch // 5 or 9 digit ZIP matches, street address matches. AVSResponseZipNoMatchAddressMatch // ZIP doesn't match, street address matches. AVSResponseZipMatchAddressUnverified // ZIP matches, street address not verified. AVSResponseZipUnverifiedAddressMatch // ZIP not verified, street address matches. AVSResponseMatch // Generic "everything matches" AVSResponseNoMatch // Generic "nothing matches" AVSResponseNonUsZipMatchAddressMatch // (Non U.S. cards) ZIP matches, street address matches. AVSResponseNonUsZipNoMatchAddressNoMatch // (Non U.S. cards) ZIP and street address don't match. AVSResponseNonUsZipUnverifiedAddressMatch // (Non U.S. cards) ZIP unverified, street address matches. AVSResponseNameNoMatch // Cardholder's name doesn't match. AVSResponseNameNoMatchAddressMatch // Cardholder's name doesn't match, street address matches. AVSResponseNameMatchZipMatchAddressNoMatch // Cardholder's name and ZIP match, street address doesn't match. AVSResponseNameMatchZipNoMatchAddressMatch // Cardholder's name and street address match, ZIP doesn't match. AVSResponseNameMatchZipNoMatchAddressNoMatch // Cardholder's name matches, ZIP and street address don't match. )
func (AVSResponse) String ¶ added in v1.0.225
func (code AVSResponse) String() string
String returns a string representation of a AVS response code
type AuthorizationRequest ¶
type AuthorizationRequest struct { Amount Amount CreditCard *CreditCard BillingAddress *BillingAddress Level3Data *Level3Data ClientTransactionReference *string // pass in an id of the transaction from any client Options map[string]interface{} }
type AuthorizationResponse ¶
type AuthorizationResponse struct { // Raw fields contain the untranslated responses from processors, while // the non-raw fields are the best parsings to a single standard, with // loss of granularity minimized. The latter should be preferred when // treating Sleet as a black box. Success bool TransactionReference string AvsResult AVSResponse CvvResult CVVResponse Response string ErrorCode string AvsResultRaw string CvvResultRaw string }
type BillingAddress ¶
type CVVResponse ¶ added in v1.0.225
type CVVResponse int
CVVResponse represents a possible CVV/CVN verification response.
const ( CVVResponseUnknown CVVResponse = iota // Unknown CVV code returned by processor CVVResponseNoResponse // No verification response was given CVVResponseError // An error prevented verification (e.g. data validation check failed) CVVResponseUnsupported // CVV verification is not supported CVVResponseMatch // CVV matches CVVResponseNoMatch // CVV doesn't match CVVResponseNotProcessed // Verification didn't happen (e.g. auth already declined by bank before checking CVV) CVVResponseRequiredButMissing // CVV should be present, but it was reported as not CVVResponseSuspicious // The issuing bank determined this transaction to be suspicious CVVResponseSkipped // Verification was not performed for this transaction )
func (CVVResponse) String ¶ added in v1.0.225
func (code CVVResponse) String() string
String returns a string representation of a CVV response code
type CaptureRequest ¶
type CaptureResponse ¶
type Client ¶
type Client interface { Authorize(request *AuthorizationRequest) (*AuthorizationResponse, error) Capture(request *CaptureRequest) (*CaptureResponse, error) Void(request *VoidRequest) (*VoidResponse, error) Refund(request *RefundRequest) (*RefundResponse, error) }
type CreditCard ¶
type Level3Data ¶
type RefundRequest ¶
type RefundResponse ¶
type VoidRequest ¶
type VoidRequest struct {
TransactionReference string
}
type VoidResponse ¶
Click to show internal directories.
Click to hide internal directories.