add receipt page for plan
This commit is contained in:
@ -277,3 +277,9 @@ func (app *application) BronzePlan(w http.ResponseWriter, r *http.Request) {
|
||||
app.errorLog.Println(err)
|
||||
}
|
||||
}
|
||||
|
||||
func (app *application) BronzePlanReceipt(w http.ResponseWriter, r *http.Request) {
|
||||
if err := app.renderTemplate(w, r, "receipt-plan", &templateData{}); err != nil {
|
||||
app.errorLog.Println(err)
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ func (app *application) routes() http.Handler {
|
||||
mux.Post("/payment-succeeded", app.PaymentSucceeded)
|
||||
|
||||
mux.Get("/plans/bronze", app.BronzePlan)
|
||||
mux.Get("/receipt/bronze", app.BronzePlanReceipt)
|
||||
|
||||
fileServer := http.FileServer(http.Dir("./static"))
|
||||
mux.Handle("/static/*", http.StripPrefix("/static", fileServer))
|
||||
|
Reference in New Issue
Block a user