From 3af6621d52c3d4b59c70f308e090c94a010416cf Mon Sep 17 00:00:00 2001 From: Mauricio Araujo Date: Wed, 1 May 2024 10:27:08 -0400 Subject: [PATCH] Remove Stripe customer prefix --- internal/billing/stripe.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/billing/stripe.go b/internal/billing/stripe.go index d23e35a0d6..5e1b83ca16 100644 --- a/internal/billing/stripe.go +++ b/internal/billing/stripe.go @@ -36,19 +36,17 @@ func (s StripeClient) CreateCustomer(ctx context.Context, userEmail string, proj defer span.End() if projectID == 0 || projectName == "" { - return "", fmt.Errorf("invalid project id or name") + return "", telemetry.Error(ctx, span, err, "invalid project id or name") } stripe.Key = s.SecretKey - // Create customer if not exists - customerName := fmt.Sprintf("project_%s", projectName) projectIDStr := strconv.FormatUint(uint64(projectID), 10) params := &stripe.CustomerParams{ - Name: stripe.String(customerName), + Name: stripe.String(projectName), Email: stripe.String(userEmail), Metadata: map[string]string{ - "porter_project_id": projectIDStr, + "project_id": projectIDStr, }, }