func MakeStripePayment(privateKey string, publishableKey string) *StripePayment { sp := &StripePayment{ client: &client.API{}, publishableKey: publishableKey, } sp.client.Init(privateKey, nil) lobster.RegisterPanelHandler("/payment/stripe/form", sp.form, false) lobster.RegisterPanelHandler("/payment/stripe/submit", sp.handle, true) return sp }
func Setup() { decoder = lobster.GetDecoder() L = lobster.L cfg = lobster.GetConfig() db = lobster.GetDatabase() lobster.RegisterPanelHandler("/panel/support", panelSupport, false) lobster.RegisterPanelHandler("/panel/support/open", panelSupportOpen, false) lobster.RegisterPanelHandler("/panel/support/{id:[0-9]+}", panelSupportTicket, false) lobster.RegisterPanelHandler("/panel/support/{id:[0-9]+}/reply", panelSupportTicketReply, true) lobster.RegisterPanelHandler("/panel/support/{id:[0-9]+}/close", panelSupportTicketClose, true) lobster.RegisterAdminHandler("/admin/support", adminSupport, false) lobster.RegisterAdminHandler("/admin/support/open/{id:[0-9]+}", adminSupportOpen, false) lobster.RegisterAdminHandler("/admin/support/{id:[0-9]+}", adminSupportTicket, false) lobster.RegisterAdminHandler("/admin/support/{id:[0-9]+}/reply", adminSupportTicketReply, true) lobster.RegisterAdminHandler("/admin/support/{id:[0-9]+}/close", adminSupportTicketClose, true) lobster.RegisterPanelWidget("Support", lobster.PanelWidgetFunc(func(session *lobster.Session) interface{} { return TicketListActive(session.UserId) })) }