Documentation ¶
Index ¶
- Constants
- Variables
- type BinInfo
- type CardConnectClient
- func (client *CardConnectClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *CardConnectClient) AuthorizeWithContext(ctx context.Context, request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *CardConnectClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *CardConnectClient) CaptureWithContext(ctx context.Context, request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *CardConnectClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *CardConnectClient) RefundWithContext(ctx context.Context, request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *CardConnectClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- func (client *CardConnectClient) VoidWithContext(ctx context.Context, request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- type Request
- type Response
Constants ¶
View Source
const ( AuthorizePath = "/cardconnect/rest/auth" CapturePath = "/cardconnect/rest/capture" VoidPath = "/cardconnect/rest/void" RefundPath = "/cardconnect/rest/refund" )
Variables ¶
View Source
var ( CIT = "C" MIT = "M" YES = "Y" NO = "N" )
Functions ¶
This section is empty.
Types ¶
type BinInfo ¶
type BinInfo struct { Country string `json:"country"` Product string `json:"product"` Bin string `json:"bin"` CardUseString string `json:"cardusestring"` Gsa bool `json:"gsa"` Corporate bool `json:"corporate"` Fsa bool `json:"fsa"` Subtype string `json:"subtype"` Purchase bool `json:"purchase"` Prepaid bool `json:"prepaid"` Issuer string `json:"issuer"` Binlo string `json:"binlo"` Binhi string `json:"binhi"` }
type CardConnectClient ¶
type CardConnectClient struct { URL string // contains filtered or unexported fields }
func NewClient ¶
func NewClient(username string, password string, merchantID string, URL string, environment common.Environment) *CardConnectClient
func NewWithHttpClient ¶
func NewWithHttpClient(username string, password string, merchantID string, URL string, environment common.Environment, httpClient *http.Client) *CardConnectClient
NewWithHttpClient uses authentication with custom http client
func (*CardConnectClient) Authorize ¶
func (client *CardConnectClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
Authorize a transaction. This transaction must be captured to receive funds
func (*CardConnectClient) AuthorizeWithContext ¶ added in v1.1.1297
func (client *CardConnectClient) AuthorizeWithContext(ctx context.Context, request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
AuthorizeWithContext authorizes a transaction. This transaction must be captured to receive funds
func (*CardConnectClient) Capture ¶
func (client *CardConnectClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
Capture an authorized transaction
func (*CardConnectClient) CaptureWithContext ¶ added in v1.1.1297
func (client *CardConnectClient) CaptureWithContext(ctx context.Context, request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
CaptureWithContext captures an authorized transaction
func (*CardConnectClient) Refund ¶
func (client *CardConnectClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
Refund a captured transaction
func (*CardConnectClient) RefundWithContext ¶ added in v1.1.1297
func (client *CardConnectClient) RefundWithContext(ctx context.Context, request *sleet.RefundRequest) (*sleet.RefundResponse, error)
RefundWithContext refunds a captured transaction
func (*CardConnectClient) Void ¶
func (client *CardConnectClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
Void an authorized transaction
func (*CardConnectClient) VoidWithContext ¶ added in v1.1.1297
func (client *CardConnectClient) VoidWithContext(ctx context.Context, request *sleet.VoidRequest) (*sleet.VoidResponse, error)
VoidWithContext voids an authorized transaction
type Request ¶
type Request struct { MerchantID string `json:"merchid"` Account *string `json:"account"` Expiry *string `json:"expiry"` Amount *string `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` CVV2 *string `json:"cvv2,omitempty"` COF *string `json:"cof,omitempty"` COFScheduled *string `json:"cofscheduled,omitempty"` Authorization *string `json:"authcode,omitempty"` RetRef *string `json:"retref,omitempty"` OrderID *string `json:"orderid,omitempty"` Region *string `json:"region,omitempty"` Name *string `json:"name,omitempty"` Address *string `json:"address,omitempty"` Address2 *string `json:"address2,omitempty"` Country *string `json:"country,omitempty"` City *string `json:"city,omitempty"` Postal *string `json:"postal,omitempty"` Phone *string `json:"phone,omitempty"` Email *string `json:"email,omitempty"` Company *string `json:"company,omitempty"` }
func UnmarshalRequest ¶
type Response ¶
type Response struct { Message *string `json:"message"` RespStat string `json:"respstat"` Token string `json:"token"` RetRef string `json:"retref"` Amount string `json:"amount"` Expiry string `json:"expiry"` MerchID string `json:"merchid"` RespCode string `json:"respcode"` RespText string `json:"resptext"` AvsResp string `json:"avsresp"` CVVResp string `json:"cvvresp"` AuthCode string `json:"authcode"` RespProc string `json:"respproc"` Emv string `json:"emv"` BinInfo *BinInfo `json:"binInfo"` Account string `json:"account"` SetlStat *string `json:"setlstat"` CommCard *string `json:"commcard"` Batchid *string `json:"batchid"` OrderID *string `json:"orderId"` Currency *string `json:"currency"` }
func UnmarshalResponse ¶
Click to show internal directories.
Click to hide internal directories.