stripe

package
v1.0.213 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargeRequest

type ChargeRequest struct {
	Amount   string `form:"amount"`
	Currency string `form:"currency"`
	Source   string `form:"source"`
	Capture  string `form:"capture"`
}

type ChargeResponse

type ChargeResponse struct {
	ID string `json:"id"`
}

type PostAuthRequest

type PostAuthRequest struct {
	Amount string `form:"amount,omitempty"`
	Charge string `form:"charge,omitempty"`
}

type StripeCard

type StripeCard struct {
	CVCCheck        string  `json:"cvc_check"`
	AddressZipCheck *string `json:"address_zip_check"`
}

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

Jump to

Keyboard shortcuts

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