Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

billing: Adjust strings on billing page for invoice payment method.

Aman Agrawalb26326815a1d
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 261f269b65b..4401843d90a 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -2261,7 +2261,7 @@ class BillingSession(ABC):
if charge_automatically:
payment_method = payment_method_string(stripe_customer)
else:
- payment_method = "Billed by invoice"
+ payment_method = "Invoice"
elif settings.DEVELOPMENT: # nocoverage
# Allow access to billing page in development environment without a stripe_customer_id.
payment_method = "Payment method not populated"
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index 5d70ab3655f..7d5b81b6520 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -965,7 +965,7 @@ class StripeTest(StripeTestCase):
self.assert_not_in_success_response(
[
"Number of licenses for current billing period",
- "Your next invoice is due on",
+ "You will receive an invoice for",
],
response,
)
@@ -1093,7 +1093,7 @@ class StripeTest(StripeTestCase):
str(123),
"Number of licenses for current billing period",
f"licenses ({self.seat_count} in use)",
- "Your next invoice is due on",
+ "You will receive an invoice for",
"January 2, 2013",
"$9,840.00", # 9840 = 80 * 123
]:
@@ -1419,10 +1419,10 @@ class StripeTest(StripeTestCase):
str(self.seat_count),
"Number of licenses for next billing period",
f"{self.seat_count} in use",
- "Your next invoice is due on",
+ "You will receive an invoice for",
"March 2, 2012",
f"{80 * 123:,.2f}",
- "Billed by invoice",
+ "Invoice",
]:
self.assert_in_response(substring, response)
diff --git a/templates/corporate/billing/billing.html b/templates/corporate/billing/billing.html
index 62156fd6a01..d2f9ba70937 100644
--- a/templates/corporate/billing/billing.html
+++ b/templates/corporate/billing/billing.html
@@ -196,6 +196,7 @@
</button>
</div>
{% endif %}
+ <br />
<div class="stripe-customer-billing-portal not-editable-realm-field">
<a href="{{ billing_base_url }}/customer_portal/?return_to_billing_page=true">View and update</a> billing information that will be displayed on your invoice and receipt.
</div>
@@ -240,7 +241,7 @@
Your plan will automatically renew on <strong>{{ renewal_date }}</strong>.
{% endif %}
{% else %}
- Your next invoice is due on <strong>{{ renewal_date }}</strong>.
+ Next invoice will be sent on <strong>{{ renewal_date }}</strong>.
{% endif %}
<br />
<div class="input-box billing-page-field">
@@ -417,7 +418,11 @@
<b><span class="new_license_count_holder"></span></b>?
</p>
<p>
+ {% if payment_method == "Invoice" %}
+ You will receive an invoice for
+ {% else %}
You will be charged for
+ {% endif %}
<b><span class="difference_license_count_holder"></span></b> additional licenses.
</p>
</main>