corporate: Use plan.name for stripe.Invoice statement descriptor.

Instead of hard coding the string for the stripe.InvoiceItem and
stripe.Invoice statement_descriptor, we use the name of the plan
that was just created.
This commit is contained in:
Lauryn Menard 2023-11-09 19:06:35 +01:00 committed by Tim Abbott
parent d29c454e80
commit 3e550364c6
1 changed files with 2 additions and 2 deletions

View File

@ -1125,7 +1125,7 @@ def process_initial_upgrade(
stripe.InvoiceItem.create(
currency="usd",
customer=customer.stripe_customer_id,
description="Zulip Cloud Standard",
description=plan.name,
discountable=False,
period={
"start": datetime_to_timestamp(billing_cycle_anchor),
@ -1147,7 +1147,7 @@ def process_initial_upgrade(
collection_method=collection_method,
customer=customer.stripe_customer_id,
days_until_due=days_until_due,
statement_descriptor="Zulip Cloud Standard",
statement_descriptor=plan.name,
)
stripe.Invoice.finalize_invoice(stripe_invoice)