Documentation
¶
Index ¶
- type AccountProvider
- type OrderItem
- type PaymentSessionResponse
- type StripePaymentProcessor
- func (s *StripePaymentProcessor) CreateAccount(isIndividual bool) (string, error)
- func (s *StripePaymentProcessor) CreateCustomer(ctx context.Context) (string, error)
- func (s *StripePaymentProcessor) CreateSession(accountID string, orderID pulid.ID, redirectUrl string, ...) (*PaymentSessionResponse, error)
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 PaymentSessionResponse ¶
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)
Click to show internal directories.
Click to hide internal directories.