// That work, you can pay. Fully functional
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"github.com/flosch/pongo2"
"github.com/gofiber/fiber/v2"
"github.com/stripe/stripe-go"
"github.com/stripe/stripe-go/customer"
)
func PricingTableHandler(c *fiber.Ctx) error {
return c.SendString(generatePricingTableChatHTML())
}
func generatePricingTableChatHTML() string {
var result User
err := edgeClient.QuerySingle(edgeCtx, "SELECT global currentUser { stripe_id, email } LIMIT 1;", &result)
if err != nil {
fmt.Print("Error getting user")
panic(err)
}
clientSecretSession := CreateClientSecretSession()
// TODO Replace by live API call
stripeTable := `