stripe

package
v1.1.65 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountProvider

type AccountProvider interface {
	GetAccountInfoForViewer(ctx context.Context) (*common.AccountInfo, error)
}

type OrderItem

type OrderItem struct {
	ID    pulid.ID
	Name  string
	Price int
}

type PaymentSessionResponse

type PaymentSessionResponse struct {
	ID  string
	Url string
}

type StripePaymentProcessor

type StripePaymentProcessor struct {
	Client        *client.API
	ClientUrl     string
	AccountClient AccountProvider
}

func NewStripePaymentProcessor

func NewStripePaymentProcessor(
	key string,
	clientUrl string,
	accountClient AccountProvider,
) *StripePaymentProcessor

func (*StripePaymentProcessor) CreateAccount

func (s *StripePaymentProcessor) CreateAccount(isIndividual bool) (string, error)

func (*StripePaymentProcessor) CreateCustomer

func (s *StripePaymentProcessor) CreateCustomer(ctx context.Context) (string, error)

func (*StripePaymentProcessor) CreateSession

func (s *StripePaymentProcessor) CreateSession(
	accountID string,
	orderID pulid.ID,
	redirectUrl string,
	orderItems ...OrderItem,
) (*PaymentSessionResponse, error)

Jump to

Keyboard shortcuts

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