From b397dfc82ddee6958682ec584b58aa6a0610075b Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Fri, 8 May 2020 19:26:33 +0300 Subject: [PATCH] satellite/payments: better labels for discounts in invoices Before: - Discount from coupon: Promotional credits (limited time - 2 billing periods) - Discount from credits After: - Promotional credits (limited time - 2 billing periods) - Credits from STORJ deposit bonus This way we don't mix the terms coupon and credit. And it is clearer when the credit comes from a deposit bonus. Change-Id: I4bba76a5501147f9de399eac41c4f157d6bda032 --- satellite/payments/stripecoinpayments/service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/satellite/payments/stripecoinpayments/service.go b/satellite/payments/stripecoinpayments/service.go index f295a1b78..37bebc47d 100644 --- a/satellite/payments/stripecoinpayments/service.go +++ b/satellite/payments/stripecoinpayments/service.go @@ -715,7 +715,7 @@ func (service *Service) createInvoiceCouponItems(ctx context.Context, coupon pay Amount: stripe.Int64(-usage.Amount), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String(customerID), - Description: stripe.String(fmt.Sprintf("Discount from coupon: %s", coupon.Description)), + Description: stripe.String(coupon.Description), Period: &stripe.InvoiceItemPeriodParams{ End: stripe.Int64(usage.Period.AddDate(0, 1, 0).Unix()), Start: stripe.Int64(usage.Period.Unix()), @@ -795,7 +795,7 @@ func (service *Service) createInvoiceCreditItem(ctx context.Context, spending Cr Amount: stripe.Int64(-spending.Amount), Currency: stripe.String(string(stripe.CurrencyUSD)), Customer: stripe.String(customerID), - Description: stripe.String(fmt.Sprintf("Discount from credits")), + Description: stripe.String("Credits from STORJ deposit bonus"), Period: &stripe.InvoiceItemPeriodParams{ End: stripe.Int64(spending.Created.AddDate(0, 1, 0).Unix()), Start: stripe.Int64(spending.Created.Unix()),