Documentation
¶
Index ¶
- func WriteFailResponse(w http.ResponseWriter, statusCode int, error interface{})
- func WriteFailResponseFromError(w http.ResponseWriter, err error)
- func WriteSuccessResponse(w http.ResponseWriter, statusCode int, data interface{}, ...)
- type Empty
- type Error
- type Meta
- type Server
- func (s Server) CreateInvoiceHandler() http.HandlerFunc
- func (s Server) CreateSubscriptionHandler() http.HandlerFunc
- func (s Server) GetInvoiceRequestHandler() http.HandlerFunc
- func (s Server) GetPaymentMethodsHandler() http.HandlerFunc
- func (s *Server) MidtransTransactionCallbackHandler() http.HandlerFunc
- func (s Server) PauseSubscriptionHandler() http.HandlerFunc
- func (s Server) ResumeSubscriptionHandler() http.HandlerFunc
- func (s Server) StopSubscriptionHandler() http.HandlerFunc
- func (s *Server) XenditDanaCallbackHandler() http.HandlerFunc
- func (s *Server) XenditInvoiceCallbackHandler() http.HandlerFunc
- func (s *Server) XenditLinkAjaCallbackHandler() http.HandlerFunc
- func (s *Server) XenditOVOCallbackHandler() http.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFailResponse ¶
func WriteFailResponse(w http.ResponseWriter, statusCode int, error interface{})
WriteFailResponse creates error response for the http handler
func WriteFailResponseFromError ¶
func WriteFailResponseFromError(w http.ResponseWriter, err error)
WriteFailResponseFromError creates error response based on the given error
func WriteSuccessResponse ¶
func WriteSuccessResponse(w http.ResponseWriter, statusCode int, data interface{}, headMap map[string]string)
WriteSuccessResponse creates success response for the http handler
Types ¶
type Server ¶
Server payment server struct
func (Server) CreateInvoiceHandler ¶
func (s Server) CreateInvoiceHandler() http.HandlerFunc
CreateInvoiceHandler handles request for creating the invoice
func (Server) CreateSubscriptionHandler ¶ added in v0.5.0
func (s Server) CreateSubscriptionHandler() http.HandlerFunc
CreateSubscriptionHandler handles request for creating new subscription
func (Server) GetInvoiceRequestHandler ¶
func (s Server) GetInvoiceRequestHandler() http.HandlerFunc
GetInvoiceRequestHandler returns handler func that will return invoice with given invoice number
func (Server) GetPaymentMethodsHandler ¶
func (s Server) GetPaymentMethodsHandler() http.HandlerFunc
GetPaymentMethodsHandler return handler func that will retrieve all payment methods available
func (*Server) MidtransTransactionCallbackHandler ¶
func (s *Server) MidtransTransactionCallbackHandler() http.HandlerFunc
MidtransTransactionCallbackHandler handles incoming notification about payment status from midtrans.
func (Server) PauseSubscriptionHandler ¶ added in v0.5.0
func (s Server) PauseSubscriptionHandler() http.HandlerFunc
PauseSubscriptionHandler returns handler for pausing subscription
func (Server) ResumeSubscriptionHandler ¶ added in v0.5.0
func (s Server) ResumeSubscriptionHandler() http.HandlerFunc
ResumeSubscriptionHandler returns resume susbcription handler
func (Server) StopSubscriptionHandler ¶ added in v0.5.0
func (s Server) StopSubscriptionHandler() http.HandlerFunc
StopSubscriptionHandler returns stop subscription handler
func (*Server) XenditDanaCallbackHandler ¶
func (s *Server) XenditDanaCallbackHandler() http.HandlerFunc
XenditDanaCallbackHandler handles incoming xendit notification about dana
func (*Server) XenditInvoiceCallbackHandler ¶
func (s *Server) XenditInvoiceCallbackHandler() http.HandlerFunc
XenditInvoiceCallbackHandler handles incoming xendit notification about xenInvoice
func (*Server) XenditLinkAjaCallbackHandler ¶
func (s *Server) XenditLinkAjaCallbackHandler() http.HandlerFunc
XenditLinkAjaCallbackHandler handles incoming xendit notification about link aja
func (*Server) XenditOVOCallbackHandler ¶
func (s *Server) XenditOVOCallbackHandler() http.HandlerFunc
XenditOVOCallbackHandler handles notification updates for ovo from xendit