Documentation ¶
Index ¶
- Constants
- type Address
- type BraintreeClient
- func (client *BraintreeClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *BraintreeClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *BraintreeClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *BraintreeClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- type Credentials
- type CreditCard
- type Transaction
- type TransactionRequest
Constants ¶
View Source
const (
TransactionTypeSale = "sale"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { FirstName string `xml:"first-name,omitempty"` LastName string `xml:"last-name,omitempty"` StreetAddress *string `xml:"street-address,omitempty"` Locality *string `xml:"locality,omitempty"` Region *string `xml:"region,omitempty"` PostalCode *string `xml:"postal-code,omitempty"` CountryCodeAlpha2 *string `xml:"country-code-alpha2,omitempty"` }
type BraintreeClient ¶
type BraintreeClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(credentials *Credentials) *BraintreeClient
func NewWithHttpClient ¶
func NewWithHttpClient(credentials *Credentials, httpClient *http.Client) *BraintreeClient
func (*BraintreeClient) Authorize ¶
func (client *BraintreeClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
func (*BraintreeClient) Capture ¶
func (client *BraintreeClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
func (*BraintreeClient) Refund ¶
func (client *BraintreeClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
func (*BraintreeClient) Void ¶
func (client *BraintreeClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
type Credentials ¶
type CreditCard ¶
type Transaction ¶
type Transaction struct { ID string `xml:"id"` Status string `xml:"status"` Type string `xml:"type"` CurrencyISOCode string `xml:"currency-iso-code"` Amount string `xml:"amount"` OrderIdD string `xml:"order-id"` CreditCard *CreditCard `xml:"credit-card"` BillingAddress *Address `xml:"billing"` CreatedAt *time.Time `xml:"created-at"` UpdatedAt *time.Time `xml:"updated-at"` AVSErrorResponseCode string `xml:"avs-error-response-code"` AVSPostalCodeResponseCode string `xml:"avs-postal-code-response-code"` AVSStreetAddressResponseCode string `xml:"avs-street-address-response-code"` CVVResponseCode string `xml:"cvv-response-code"` }
type TransactionRequest ¶
Click to show internal directories.
Click to hide internal directories.