Documentation ¶
Index ¶
- func NewCreditCardCommand(ex cuirass.Executor, gateway *AuthorizeNetGateway, order *Order, ...) *cuirass.Command
- func NewGetOrderCommand(ex cuirass.Executor, orderId int) *cuirass.Command
- func NewGetPaymentInformationCommand(user *UserAccount) *cuirass.Command
- func NewGetUserAccountCommand(cookie *http.Cookie) *cuirass.Command
- type AuthorizeNetGateway
- type CreditCardAuthorizationResult
- type Expiration
- type Order
- type PaymentInformation
- type Result
- type Target
- type TransactionType
- type UserAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreditCardCommand ¶
func NewCreditCardCommand( ex cuirass.Executor, gateway *AuthorizeNetGateway, order *Order, payment *PaymentInformation, amount *big.Rat) *cuirass.Command
func NewGetOrderCommand ¶
func NewGetPaymentInformationCommand ¶
func NewGetPaymentInformationCommand(user *UserAccount) *cuirass.Command
Types ¶
type AuthorizeNetGateway ¶
type AuthorizeNetGateway struct { }
func (*AuthorizeNetGateway) Submit ¶
func (g *AuthorizeNetGateway) Submit( creditCardNumber, expirationMonth, expirationYear string, authCapture TransactionType, amount *big.Rat, order *Order) Result
type CreditCardAuthorizationResult ¶
type CreditCardAuthorizationResult struct { Success bool AuthorizationCode, TransactionId string ErrorMessage string }
func NewFailedResponse ¶
func NewFailedResponse(message string) CreditCardAuthorizationResult
func NewSuccessResponse ¶
func NewSuccessResponse(transactionId, authorizationCode string) CreditCardAuthorizationResult
type Expiration ¶
type Expiration struct {
Month, Year int
}
type Order ¶
type Order struct { OrderId int User *UserAccount }
type PaymentInformation ¶
type PaymentInformation struct { UserAccount *UserAccount CreditCardNumber string Expiration Expiration }
func NewPaymentInformation ¶
func NewPaymentInformation( userAccount *UserAccount, creditCardNumber string, expirationMonth, expirationYear int) *PaymentInformation
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) IsApproved ¶
func (*Result) IsDeclined ¶
func (*Result) ReasonResponseCode ¶
func (*Result) ResponseText ¶
type Target ¶
type Target struct{}
func (*Target) AuthorizationCode ¶
func (*Target) TransactionId ¶
type UserAccount ¶
func NewUserAccount ¶
func NewUserAccount(id uint64, name string, accountType int) *UserAccount
Click to show internal directories.
Click to hide internal directories.