stripe

package
v0.0.0-...-b3f3fbb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2015 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Overview

Package stripe provides the stripe provider driver

Index

Constants

View Source
const (
	// StripeDriverPath is the (sub-)path under which Stripe driver endpoints
	// will be attached
	StripeDriverPath = "/stripe"
)

Variables

View Source
var (
	ErrDatabase = errors.New("database error")
	ErrInternal = errors.New("stripe driver internal error")
	ErrHTTP     = errors.New("HTTP error")
	ErrProvider = errors.New("provider error")
)
View Source
var (
	ErrConfigNotFound      = errors.New("config not found")
	ErrTransactionNotFound = errors.New("transaction not found")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectID int64
	MethodKey string
	Created   time.Time
	CreatedBy string

	SecretKey string
	PublicKey string
}

func ConfigByPaymentMethodDB

func ConfigByPaymentMethodDB(db *sql.DB, method *payment_method.Method) (*Config, error)

func ConfigByPaymentMethodTx

func ConfigByPaymentMethodTx(db *sql.Tx, method *payment_method.Method) (*Config, error)

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is the Stripe provider driver

func (*Driver) Attach

func (d *Driver) Attach(ctx *service.Context, m *mux.Router) error

func (*Driver) BadRequestHandler

func (d *Driver) BadRequestHandler() http.Handler

func (*Driver) InitPageHandler

func (d *Driver) InitPageHandler(p *payment.Payment) http.Handler

InitPageHandler serves the init page (loading screen)

func (*Driver) InitPayment

func (d *Driver) InitPayment(p *payment.Payment, pm *payment_method.Method) (http.Handler, error)

func (*Driver) InternalErrorHandler

func (d *Driver) InternalErrorHandler(p *payment.Payment) http.Handler

func (*Driver) NotFoundHandler

func (d *Driver) NotFoundHandler(p *payment.Payment) http.Handler

func (*Driver) ProcessHandler

func (d *Driver) ProcessHandler() http.Handler

takes the post request and handles the stripe checkout

func (*Driver) SuccessHandler

func (d *Driver) SuccessHandler(p *payment.Payment) http.Handler

Jump to

Keyboard shortcuts

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