stripe

package
v1.1.1338 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StripeClient

type StripeClient struct {
	// contains filtered or unexported fields
}

StripeClient uses API-Key and custom http client to make http calls

func NewClient

func NewClient(apiKey string) *StripeClient

NewClient uses default http client with provided Stripe API Key Note: the environment is kind of explicitly given to us by the apiKey

func NewWithHTTPClient

func NewWithHTTPClient(apiKey string, httpClient *http.Client) *StripeClient

NewWithHTTPClient uses a custom http client for requests

func (*StripeClient) Authorize

func (client *StripeClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)

Authorize a transaction for specified amount using stripe-go library

func (*StripeClient) AuthorizeWithContext added in v1.1.1297

func (client *StripeClient) AuthorizeWithContext(ctx context.Context, request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)

AuthorizeWithContext a transaction for specified amount using stripe-go library

func (*StripeClient) Capture

func (client *StripeClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)

Capture an authorized transaction by charge ID

func (*StripeClient) CaptureWithContext added in v1.1.1297

func (client *StripeClient) CaptureWithContext(ctx context.Context, request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)

CaptureWithContext an authorized transaction by charge ID

func (*StripeClient) Refund

func (client *StripeClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)

Refund a captured transaction with amount and charge ID

func (*StripeClient) RefundWithContext added in v1.1.1297

func (client *StripeClient) RefundWithContext(ctx context.Context, request *sleet.RefundRequest) (*sleet.RefundResponse, error)

RefundWithContext a captured transaction with amount and charge ID

func (*StripeClient) Void

func (client *StripeClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)

Void an authorized transaction with charge ID

func (*StripeClient) VoidWithContext added in v1.1.1297

func (client *StripeClient) VoidWithContext(ctx context.Context, request *sleet.VoidRequest) (*sleet.VoidResponse, error)

VoidWithContext an authorized transaction with charge ID

Jump to

Keyboard shortcuts

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