Skip to content

Commit

Permalink
hotfix: invoice creation
Browse files Browse the repository at this point in the history
  • Loading branch information
maikirakiwi committed Nov 26, 2023
1 parent f3ea14c commit 7291b8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func serveWeb() {
r.Get("/pay/{linkID}", checkoutSessionHandler)
r.Post("/webhook", webhookHandler)
r.Get("/success", successHandler)
fmt.Println("Starting server on port 4242")
fmt.Printf("Starting server on port 4242, please reverse proxy %s to this port.", DB.GetSettings().Domain)
http.ListenAndServe(":4242", r)
}

Expand Down
5 changes: 3 additions & 2 deletions menu/createNewLink.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func CreateNewLink() {

params.LineItems = li
params.Mode = stripe.String("payment")
params.SuccessURL = stripe.String("http://" + settings.Domain + ":4242/success")
params.SuccessURL = stripe.String("http://" + settings.Domain + "/success")

// Optional
customFields := allowCustomFields()
Expand Down Expand Up @@ -346,8 +346,9 @@ func allowInvoices() *stripe.CheckoutSessionInvoiceCreationParams {
return nil
}

res := &stripe.CheckoutSessionInvoiceCreationParams{}
res := new(stripe.CheckoutSessionInvoiceCreationParams)
res.Enabled = stripe.Bool(true)
res.InvoiceData = &stripe.CheckoutSessionInvoiceCreationInvoiceDataParams{}
if allInvoiceTemplates[index].TaxID != "" {
res.InvoiceData.AccountTaxIDs = []*string{
&allInvoiceTemplates[index].TaxID,
Expand Down

0 comments on commit 7291b8c

Please sign in to comment.