authorize_net

package
v1.0.206 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (*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 BillingAddress struct {
	FirstName string  `json:"firstName"`
	LastName  string  `json:"lastName"`
	Company   string  `json:"company"`
	Address   *string `json:"address"`
	City      *string `json:"city"`
	State     *string `json:"state"`
	Zip       *string `json:"zip"`
	Country   *string `json:"country"`
}

type CreateTransactionRequest

type CreateTransactionRequest struct {
	MerchantAuthentication MerchantAuthentication `json:"merchantAuthentication"`
	RefID                  *string                `json:"refId,omitempty"`
	TransactionRequest     TransactionRequest     `json:"transactionRequest"`
}

type CreditCard

type CreditCard struct {
	CardNumber     string  `json:"cardNumber"`
	ExpirationDate string  `json:"expirationDate"`
	CardCode       *string `json:"cardCode,omitempty"`
}

type Error

type Error struct {
	ErrorCode string `json:"errorCode"`
	ErrorText string `json:"errorText"`
}

type MerchantAuthentication

type MerchantAuthentication struct {
	Name           string `json:"name"`
	TransactionKey string `json:"transactionKey"`
}

type Message

type Message struct {
	Code string `json:"code"`
	Text string `json:"text"`
}

type Messages

type Messages struct {
	ResultCode string    `json:"resultCode"`
	Message    []Message `json:"message"`
}

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"`
}

type TransactionResponseMessage

type TransactionResponseMessage struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL