appstripe

package
v1.0.0-beta.187 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPostgresHost = "127.0.0.1"
)
View Source
const (
	PostgresURLTemplate = "postgres://postgres:postgres@%s:5432/postgres?sslmode=disable"
)

Variables

View Source
var TestStripeAPIKey = "test_stripe_api_key"

Functions

This section is empty.

Types

type AppHandlerTestSuite

type AppHandlerTestSuite struct {
	Env TestEnv
	// contains filtered or unexported fields
}

func (*AppHandlerTestSuite) TestCreate

func (s *AppHandlerTestSuite) TestCreate(ctx context.Context, t *testing.T)

TestCreate tests to create a new stripe app

func (*AppHandlerTestSuite) TestCreateCheckoutSession

func (s *AppHandlerTestSuite) TestCreateCheckoutSession(ctx context.Context, t *testing.T)

TestCreateCheckoutSession tests stripe app behavior when creating a new checkout session

func (*AppHandlerTestSuite) TestCustomerData

func (s *AppHandlerTestSuite) TestCustomerData(ctx context.Context, t *testing.T)

TestCustomerData tests stripe app behavior when adding customer data

func (*AppHandlerTestSuite) TestCustomerValidate

func (s *AppHandlerTestSuite) TestCustomerValidate(ctx context.Context, t *testing.T)

TestCustomerValidate tests stripe app behavior when validating a customer

func (*AppHandlerTestSuite) TestGet

func (s *AppHandlerTestSuite) TestGet(ctx context.Context, t *testing.T)

TestGet tests getting a stripe app

func (*AppHandlerTestSuite) TestGetDefault

func (s *AppHandlerTestSuite) TestGetDefault(ctx context.Context, t *testing.T)

TestGetDefault tests getting the default stripe app

func (*AppHandlerTestSuite) TestUninstall

func (s *AppHandlerTestSuite) TestUninstall(ctx context.Context, t *testing.T)

TestUninstall tests uninstalling a stripe app

type StripeClientMock

type StripeClientMock struct {
	StripeAccountID string
}

func (*StripeClientMock) CreateCustomer

func (*StripeClientMock) DeleteWebhook

func (*StripeClientMock) GetAccount

func (*StripeClientMock) GetClient

func (c *StripeClientMock) GetClient() *client.API

func (*StripeClientMock) GetCustomer

func (c *StripeClientMock) GetCustomer(ctx context.Context, stripeCustomerID string) (stripeclient.StripeCustomer, error)

func (*StripeClientMock) GetPaymentMethod

func (c *StripeClientMock) GetPaymentMethod(ctx context.Context, paymentMethodID string) (stripeclient.StripePaymentMethod, error)

func (*StripeClientMock) SetupWebhook

type TestEnv

type TestEnv interface {
	App() app.Service
	AppStripe() appstripe.Service
	Customer() customer.Service
	Secret() secret.Service
	Close() error
}

func NewTestEnv

func NewTestEnv(t *testing.T, ctx context.Context) (TestEnv, error)

Jump to

Keyboard shortcuts

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