stripe

package
v0.0.0-...-eac6ddc Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct{}

func NewStripeComponent

func NewStripeComponent(apiKey string) (*Component, error)
func (c *Component) CreateNewAccountLink(stripeConnectedAccountId, refreshUrl, returnUrl string) (*stripe.AccountLink, error)

CreateNewAccountLink creates a new account link object for a given merchant account

func (*Component) CreateNewStripeConnectedAccount

func (c *Component) CreateNewStripeConnectedAccount(merchantAcct *models.MerchantAccount) (string, error)

CreateNewStripeConnectedAccount creates a new stripe connected account for a given merchant

func (*Component) GetStripeConnectedAccount

func (c *Component) GetStripeConnectedAccount(acctId string, params *stripe.AccountParams) (*stripe.Account, error)

GetStripeConnectedAccount returns a stripe connected account record

type Interface

type Interface interface {
	// CreateNewStripeConnectedAccount invokes the stripe API to create a new connected account
	// and returns the connected account ID
	//
	// A stripe connected account enables our merchant to accept payments and move funds to their bank account.
	// Connected accounts represent our user in Stripe’s API and help facilitate the collection of onboarding
	// requirements so Stripe can verify the user’s identity
	CreateNewStripeConnectedAccount(merchantAcct *models.MerchantAccount) (string, error)

	// CreateNewAccountLink invokes the stripe API an returns a set of redirect links which are crucial for
	// merchant the account onboarding process
	CreateNewAccountLink(stripeConnectedAccountId, refreshUrl, returnUrl string) (*stripe.AccountLink, error)
}

Jump to

Keyboard shortcuts

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