Documentation ¶
Index ¶
- type ChargeRequest
- type ChargeResponse
- type PostAuthRequest
- type StripeCard
- type StripeClient
- func (client *StripeClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *StripeClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *StripeClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *StripeClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
- type TokenRequest
- type TokenResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChargeRequest ¶
type ChargeResponse ¶
type ChargeResponse struct {
ID string `json:"id"`
}
type PostAuthRequest ¶
type StripeCard ¶
type StripeClient ¶
type StripeClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(apiKey string) *StripeClient
func NewWithHTTPClient ¶
func NewWithHTTPClient(apiKey string, httpClient *http.Client) *StripeClient
func (*StripeClient) Authorize ¶
func (client *StripeClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
func (*StripeClient) Capture ¶
func (client *StripeClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
func (*StripeClient) Refund ¶
func (client *StripeClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
func (*StripeClient) Void ¶
func (client *StripeClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
type TokenRequest ¶
type TokenRequest struct { Number string `form:"card[number]"` ExpMonth string `form:"card[exp_month]"` ExpYear string `form:"card[exp_year]"` CVC string `form:"card[cvc]"` Name string `form:"card[name]"` AddressLine1 string `form:"card[address_line1],omitempty"` AddressLine2 string `form:"card[address_line2],omitempty"` AddressCity string `form:"card[address_city],omitempty"` AddressState string `form:"card[address_state],omitempty"` AddressCountry string `form:"card[address_country],omitempty"` AddressZip string `form:"card[address_zip],omitempty"` }
type TokenResponse ¶
type TokenResponse struct { ID string `json:"id"` Card StripeCard `json:"card"` }
Click to show internal directories.
Click to hide internal directories.