March 2019
Beginner to intermediate
324 pages
7h 17m
English
This handler involves more functionality than just reading requests and calling the database. This is because we'll need to interact with Stripe's API to charge a customer's credit card. We will be covering this method more details in the next chapter. For now, let's create an empty handler to use in our code, as follows:
func (h *Handler) Charge(c *gin.Context) { if h.db == nil { return }}
Read now
Unlock full access