cardconnect

package
v1.37.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationReq

type AuthorizationReq struct {
	Account  string `json:"account"`        // "account":  "4111111111111111",
	AcctType string `json:"accttype"`       // "accttype": "VISA",
	Address  string `json:"address"`        // "address":  "123 MAIN STREET",
	Amount   int64  `json:"amount,string"`  // "amount":   "0",
	City     string `json:"city"`           // "city":     "anytown",
	Country  string `json:"country"`        // "country":  "US",
	Currency string `json:"currency"`       // "currency": "USD",
	CVV2     int    `json:"cvv2"`           // "cvv2":     "123",
	Ecomind  string `json:"ecomind"`        // "ecomind":  "E",
	Expiry   string `json:"expiry"`         // "expiry":   "1212",
	MerchId  int    `json:"merchid,string"` // "merchid":  "000000927996",
	Name     string `json:"name"`           // "name":     "TOM JONES",
	Email    string `json:"email"`          // "email":    "dev@hanzo.ai JONES",
	Phone    string `json:"phone"`          // "phone":    "913-777-9708",
	OrderId  string `json:"orderid"`        // "orderid":  "AB-11-9876",
	Postal   string `json:"postal"`         // "postal":   "55555",
	Region   string `json:"region"`         // "region":   "NY",
	Tokenize string `json:"tokenize"`       // "tokenize": "Y",

	// Capture Request can be embeded to automate capture, we probably want to
	// do this.                         // {
	Capture string     `json:"capture"` // "capture":  "Y",
	Items   []LineItem `json:"items"`   // "items": [],

}

type AuthorizationRes

type AuthorizationRes struct {
	Account  string `json:"account"`  // "account":  "41XXXXXXXXXX1111",
	Amount   string `json:"amount"`   // "amount":   "111",
	AuthCode string `json:"authcode"` // "authcode": "046221",
	AVSRes   string `json:"avsresp"`  // "avsresp":  "9",
	CVVRes   string `json:"cvvresp"`  // "cvvresp":  "M",
	MerchId  string `json:"merchid"`  // "merchid":  "020594000000",
	Code     string `json:"respcode"` // "respcode": "00",
	ResProc  string `json:"respproc"` // "respproc": "FNOR"
	Status   string `json:"respstat"` // "respstat": "A",
	Text     string `json:"resptext"` // "resptext": "Approved",
	RetRef   string `json:"retref"`   // "retref":   "343005123105",
	Token    string `json:"token"`    // "token":    "9419786452781111",

} // }

func Authorize

func Authorize(ctx context.Context, order *order.Order, user *user.User) (ares AuthorizationRes, err error)

type LineItem

type LineItem struct {
	SKU          string // {
	Cost         int64  `json:"unitcost,string"` // "unitcost":    "450",
	Description  string `json:"description"`     // "description": "DESCRIPTION-2",
	DiscountAmnt int64  `json:"discamnt,string"` // "discamnt":    "0",
	LineNo       int    `json:"lineno,string"`   // "lineno":      "2",
	Quantity     int    `json:"quantity,string"` // "quantity":    "2000",
	UOM          string `json:"uom"`             // "uom":         "EA",


} //  }

Jump to

Keyboard shortcuts

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