stripe

package
v0.0.0-...-1551971 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIKey string
}

func (*Client) AddProduct

func (c *Client) AddProduct(sku, currency string, amount float64) (string, error)

func (*Client) ChargeCustomer

func (c *Client) ChargeCustomer(priceID, customerID string) (string, error)

func (*Client) CreateCardToken

func (c *Client) CreateCardToken(cardNmuber, expMonth, expYear, cvc string) (string, error)

func (*Client) CreateCustomer

func (c *Client) CreateCustomer(email, cardToken, userName string) (string, error)

func (*Client) UpdateCustomer

func (c *Client) UpdateCustomer(customerID, cardToken string) error

type Stripe

type Stripe interface {
	AddProduct(sku, currency string, amount float64) (string, error)
	ChargeCustomer(priceID, customerID string) (string, error)
	CreateCardToken(cardNmuber, expMonth, expYear, cvc string) (string, error)
	CreateCustomer(email, cardToken, userName string) (string, error)
	UpdateCustomer(customerID, cardToken string) error
}

func NewStripe

func NewStripe(key string) Stripe

Jump to

Keyboard shortcuts

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