Documentation ¶
Index ¶
- Constants
- type AuthorizeNetClient
- func (client *AuthorizeNetClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *AuthorizeNetClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *AuthorizeNetClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *AuthorizeNetClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- type BillingAddress
- type CreateTransactionRequest
- type CreditCard
- type Error
- type MerchantAuthentication
- type Message
- type Messages
- type Payment
- type Request
- type Response
- type TransactionRequest
- type TransactionResponse
- type TransactionResponseMessage
Constants ¶
View Source
const (
ResponseCodeApproved = "1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeNetClient ¶
type AuthorizeNetClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(merchantName string, transactionKey string) *AuthorizeNetClient
func NewWithHttpClient ¶
func NewWithHttpClient(merchantName string, transactionKey string, httpClient *http.Client) *AuthorizeNetClient
func (*AuthorizeNetClient) Authorize ¶
func (client *AuthorizeNetClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
func (*AuthorizeNetClient) Capture ¶
func (client *AuthorizeNetClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
func (*AuthorizeNetClient) Refund ¶
func (client *AuthorizeNetClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
func (*AuthorizeNetClient) Void ¶
func (client *AuthorizeNetClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
type BillingAddress ¶
type CreateTransactionRequest ¶
type CreateTransactionRequest struct { MerchantAuthentication MerchantAuthentication `json:"merchantAuthentication"` RefID *string `json:"refId,omitempty"` TransactionRequest TransactionRequest `json:"transactionRequest"` }
type CreditCard ¶
type MerchantAuthentication ¶
type Payment ¶
type Payment struct {
CreditCard CreditCard `json:"creditCard"`
}
type Request ¶
type Request struct {
CreateTransactionRequest CreateTransactionRequest `json:"createTransactionRequest"`
}
type Response ¶
type Response struct { TransactionResponse TransactionResponse `json:"transactionResponse"` RefID string `json:"refId"` Messsages Messages `json:"messages"` }
type TransactionRequest ¶
type TransactionRequest struct { TransactionType string `json:"transactionType"` Amount *string `json:"amount,omitempty"` Payment *Payment `json:"payment,omitempty"` BillingAddress *BillingAddress `json:"billTo,omitempty"` RefTransactionID *string `json:"refTransId,omitempty"` }
type TransactionResponse ¶
type TransactionResponse struct { ResponseCode string `json:"responseCode"` AuthCode string `json:"authCode"` AVSResultCode string `json:"avsResultCode"` CVVResultCode string `json:"cvvResultCode"` CAVVResultCode string `json:"cavvResultCode"` TransID string `json:"transId"` RefTransID string `json:"refTransID"` TransHash string `json:"transHash"` AccountNumber string `json:"accountNumber"` AccountType string `json:"accountType"` Messages []TransactionResponseMessage `json:"messages"` Errors []Error `json:"errors"` }
Click to show internal directories.
Click to hide internal directories.