Documentation ¶
Overview ¶
Package stripe provides the stripe provider driver
Index ¶
- Constants
- Variables
- type Config
- type Driver
- func (d *Driver) Attach(ctx *service.Context, m *mux.Router) error
- func (d *Driver) BadRequestHandler() http.Handler
- func (d *Driver) InitPageHandler(p *payment.Payment) http.Handler
- func (d *Driver) InitPayment(p *payment.Payment, pm *payment_method.Method) (http.Handler, error)
- func (d *Driver) InternalErrorHandler(p *payment.Payment) http.Handler
- func (d *Driver) NotFoundHandler(p *payment.Payment) http.Handler
- func (d *Driver) ProcessHandler() http.Handler
- func (d *Driver) SuccessHandler(p *payment.Payment) http.Handler
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 ConfigByPaymentMethodTx ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the Stripe provider driver
func (*Driver) BadRequestHandler ¶
func (*Driver) InitPageHandler ¶
InitPageHandler serves the init page (loading screen)
func (*Driver) InitPayment ¶
func (*Driver) InternalErrorHandler ¶
func (*Driver) ProcessHandler ¶
takes the post request and handles the stripe checkout
Click to show internal directories.
Click to hide internal directories.