Documentation
¶
Index ¶
- type Address
- type Authentication
- type Authorization
- type AuthorizationResponse
- type Capture
- type CaptureResponse
- type Card
- type CardholderAuthentication
- type Client
- func (c *Client) Authorization(ctx context.Context, auth *Authorization) (*LitleOnlineResponse, error)
- func (c *Client) Capture(ctx context.Context, capture *Capture) (*LitleOnlineResponse, error)
- func (c *Client) EcheckSale(ctx context.Context, echeckSale *EcheckSale) (*LitleOnlineResponse, error)
- func (c *Client) GetTransactionXml(payload interface{}) ([]byte, error)
- func (c *Client) NewRequest(ctx context.Context, payload interface{}) (*http.Request, error)
- func (c *Client) RefundReversal(ctx context.Context, refundReversal *RefundReversal) (*LitleOnlineResponse, error)
- func (c *Client) Sale(ctx context.Context, sale *Sale) (*LitleOnlineResponse, error)
- func (c *Client) Send(req *http.Request, v interface{}) error
- func (c *Client) SetLog(log io.Writer)
- func (c *Client) Void(ctx context.Context, void *Void) (*LitleOnlineResponse, error)
- type CustomBilling
- type DetailTax
- type Echeck
- type EcheckSale
- type EcheckSaleResponse
- type EnhancedData
- type FraudResult
- type LineItemData
- type LitleOnlineRequest
- type LitleOnlineResponse
- type RefundReversal
- type RefundReversalResponse
- type Sale
- type SaleResponse
- type Void
- type VoidResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Name string `xml:"name"`
AddressLine1 string `xml:"addressLine1"`
AddressLine2 string `xml:"addressLine2"`
AddressLine3 string `xml:"addressLine3"`
City string `xml:"city"`
State string `xml:"state"`
Zip string `xml:"zip"`
Country string `xml:"country"`
Email string `xml:"email"`
Phone string `xml:"phone"`
}
type Authentication ¶
type Authorization ¶
type Authorization struct {
XMLName xml.Name `xml:"authorization"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
OrderId string `xml:"orderId"`
Amount int `xml:"amount"`
OrderSource string `xml:"orderSource"`
BillToAddress Address `xml:"billToAddress"`
Card Card `xml:"card"`
CardholderAuthentication *CardholderAuthentication `xml:"cardholderAuthentication"`
}
type AuthorizationResponse ¶
type AuthorizationResponse struct {
XMLName xml.Name `xml:"authorizationResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
OrderId string `xml:"orderId"`
Response string `xml:"response"`
ResponseTime string `xml:"responseTime"`
PostDate string `xml:"postDate"`
Message string `xml:"message"`
AuthCode string `xml:"authCode"`
ApprovedAmount string `xml:"approvedAmount"`
NetworkTransactionId string `xml:"networkTransactionId"`
}
type Capture ¶
type Capture struct {
XMLName xml.Name `xml:"capture"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
Partial bool `xml:"partial,attr"`
LitleTxnId string `xml:"litleTxnId"`
Amount int `xml:"amount"`
EnhancedData *EnhancedData `xml:"enhancedData"`
}
type CaptureResponse ¶
type CaptureResponse struct {
XMLName xml.Name `xml:"captureResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
Response string `xml:"response"`
ResponseTime string `xml:"responseTime"`
PostDate string `xml:"postDate"`
Message string `xml:"message"`
}
type Client ¶
type Client struct {
Client *http.Client
Login string
Password string
ApiBase string
MerchantId string
Log io.Writer
// contains filtered or unexported fields
}
func (*Client) Authorization ¶
func (c *Client) Authorization(ctx context.Context, auth *Authorization) (*LitleOnlineResponse, error)
func (*Client) EcheckSale ¶ added in v0.0.3
func (c *Client) EcheckSale(ctx context.Context, echeckSale *EcheckSale) (*LitleOnlineResponse, error)
func (*Client) GetTransactionXml ¶ added in v0.0.8
func (*Client) NewRequest ¶
func (*Client) RefundReversal ¶
func (c *Client) RefundReversal(ctx context.Context, refundReversal *RefundReversal) (*LitleOnlineResponse, error)
type CustomBilling ¶
type EcheckSale ¶ added in v0.0.3
type EcheckSale struct {
XMLName xml.Name `xml:"echeckSale"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
OrderId string `xml:"orderId"`
Verify bool `xml:"verify"`
Amount int `xml:"amount"`
OrderSource string `xml:"orderSource"`
BillToAddress Address `xml:"billToAddress"`
Echeck Echeck `xml:"echeck"`
}
type EcheckSaleResponse ¶ added in v0.0.3
type EcheckSaleResponse struct {
XMLName xml.Name `xml:"echeckSalesResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
Response string `xml:"response"`
ResponseTime string `xml:"responseTime"`
Message string `xml:"message"`
PostDate string `xml:"postDate"`
}
type EnhancedData ¶
type EnhancedData struct {
CustomerReference string `xml:"customerReference"`
SalesTax int `xml:"salesTax"`
TaxExempt bool `xml:"taxExempt"`
DiscountAmount int `xml:"discountAmount"`
ShippingAmount int `xml:"shippingAmount"`
DutyAmount int `xml:"dutyAmount"`
ShipFromPostalCode string `xml:"shipFromPostalCode"`
DestinationPostalCode string `xml:"destinationPostalCode"`
DestinationCountryCode string `xml:"destinationCountryCode"`
InvoiceReferenceNumber string `xml:"invoiceReferenceNumber"`
OrderDate string `xml:"orderDate"`
DetailTax DetailTax `xml:"detailTax"`
LineItemData []LineItemData `xml:"lineItemData"`
}
type FraudResult ¶
type LineItemData ¶
type LineItemData struct {
ItemSequenceNumber int `xml:"itemSequenceNumber"`
ItemDescription string `xml:"itemDescription"`
ProductCode string `xml:"productCode"`
Quantity int `xml:"quantity"`
UnitOfMeasure string `xml:"unitOfMeasure"`
TaxAmount int `xml:"taxAmount"`
LineItemTotal int `xml:"lineItemTotal"`
LineItemTotalWithTax int `xml:"lineItemTotalWithTax"`
ItemDiscountAmount int `xml:"itemDiscountAmount"`
CommodityCode string `xml:"commodityCode"`
UnitCost float64 `xml:"unitCost"`
DetailTax DetailTax `xml:"detailTax"`
}
type LitleOnlineRequest ¶
type LitleOnlineRequest struct {
XMLName xml.Name `xml:"litleOnlineRequest"`
Version string `xml:"version,attr"`
XmlNamespace string `xml:"xmlns,attr"`
MerchantId string `xml:"merchantId,attr"`
Authentication Authentication `xml:"authentication"`
Authorization *Authorization `xml:"authorization"`
Capture *Capture `xml:"capture"`
Sale *Sale `xml:"sale"`
RefundReversal *RefundReversal `xml:"refundReversal"`
Void *Void `xml:"void"`
EcheckSale *EcheckSale `xml:"echeckSale"`
}
type LitleOnlineResponse ¶
type LitleOnlineResponse struct {
XMLName xml.Name `xml:"litleOnlineResponse"`
Version string `xml:"version,attr"`
XmlNS string `xml:"xmlns,attr"`
Response string `xml:"response,attr"`
Message string `xml:"message,attr"`
AuthorizationResponse *AuthorizationResponse `xml:"authorizationResponse,omitempty"`
CaptureResponse *CaptureResponse `xml:"captureResponse,omitempty"`
EcheckSaleResponse *EcheckSaleResponse `xml:"echeckSalesResponse,omitempty"`
SaleResponse *SaleResponse `xml:"saleResponse,omitempty"`
RefundReversalResponse *RefundReversalResponse `xml:"refundReversalResponse,omitempty"`
VoidResponse *VoidResponse `xml:"voidResponse,omitempty"`
}
func (*LitleOnlineResponse) Error ¶
func (r *LitleOnlineResponse) Error() string
func (*LitleOnlineResponse) HasError ¶
func (r *LitleOnlineResponse) HasError() bool
Error method implementation for ErrorResponse struct
type RefundReversal ¶
type RefundReversal struct {
XMLName xml.Name `xml:"refundReversal"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
Card Card `xml:"card"`
OriginalRefCode string `xml:"originalRefCode"`
OriginalAmount int `xml:"originalAmount"`
OriginalTxnTime string `xml:"originalTxnTime"`
OriginalSystemTraceId string `xml:"originalSystemTraceId"`
OriginalSequenceNumber string `xml:"originalSequenceNumber"`
}
type RefundReversalResponse ¶
type RefundReversalResponse struct {
XMLName xml.Name `xml:"refundReversalResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
Response string `xml:"response"`
ResponseTime string `xml:"responseTime"`
PostDate string `xml:"postDate"`
Message string `xml:"message"`
}
type Sale ¶
type Sale struct {
XMLName xml.Name `xml:"sale"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
OrderId string `xml:"orderId"`
Amount int `xml:"amount"`
OrderSource string `xml:"orderSource"`
BillToAddress Address `xml:"billToAddress"`
Card Card `xml:"card"`
CardholderAuthentication *CardholderAuthentication `xml:"cardholderAuthentication"`
CustomBilling *CustomBilling `xml:"customBilling"`
EnhancedData *EnhancedData `xml:"enhancedData"`
}
type SaleResponse ¶
type SaleResponse struct {
XMLName xml.Name `xml:"saleResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
CustomerId string `xml:"customerId,attr"`
LitleTxnId string `xml:"litleTxnId"`
Response string `xml:"response"`
OrderId string `xml:"orderId"`
ResponseTime string `xml:"responseTime"`
PostDate string `xml:"postDate"`
Message string `xml:"message"`
AuthCode string `xml:"authCode"`
FraudResult *FraudResult `xml:"fraudResult"`
}
type VoidResponse ¶
type VoidResponse struct {
XMLName xml.Name `xml:"voidResponse"`
Id string `xml:"id,attr"`
ReportGroup string `xml:"reportGroup,attr"`
LitleTxnId string `xml:"litleTxnId"`
Response string `xml:"response"`
ResponseTime string `xml:"responseTime"`
PostDate string `xml:"postDate"`
Message string `xml:"message"`
}
Click to show internal directories.
Click to hide internal directories.