From 79404a50da67bec9b41aae161682a02fa50b4587 Mon Sep 17 00:00:00 2001 From: Joerg Lehmann Date: Tue, 13 Apr 2021 17:18:49 +0200 Subject: [PATCH] do not send stripe receipt --- stripe.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stripe.go b/stripe.go index eb655cb..3fe90c8 100644 --- a/stripe.go +++ b/stripe.go @@ -53,8 +53,7 @@ func getstripepaymentintentHandler(response http.ResponseWriter, request *http.R params := &stripe.PaymentIntentParams{ Amount: stripe.Int64(abo_amount), - Currency: stripe.String(string(stripe.CurrencyCHF)), - ReceiptEmail: stripe.String(name), + Currency: stripe.String(string(stripe.CurrencyCHF)) } params.AddMetadata("charge_data", charge_data[0]) params.AddMetadata("login_user", name) @@ -121,7 +120,7 @@ func stripeWebhookHandler(w http.ResponseWriter, req *http.Request) { return } fmt.Printf("PaymentIntent was successful (charge_data: %s, amount: %d)!\n", paymentIntent.Metadata["charge_data"], paymentIntent.Amount) - HandlePayment(paymentIntent.ReceiptEmail, paymentIntent.Metadata["charge_data"], paymentIntent.Amount) + HandlePayment(paymentIntent.Metadata["login_user"], paymentIntent.Metadata["charge_data"], paymentIntent.Amount) // ... handle other event types default: fmt.Fprintf(os.Stderr, "Unexpected event type: %s\n", event.Type)