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.

upgrade: Show tier corresponding to session on upgrade page.

Aman Agrawal5d49e54d3301
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index 0472b39426b..4c97416aade 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -1508,7 +1508,7 @@ class BillingSession(ABC):
"billing_base_url": self.billing_base_url,
},
"payment_method": current_payment_method,
- "plan": "Zulip Cloud Standard",
+ "plan": CustomerPlan.name_from_tier(tier),
"salt": salt,
"seat_count": seat_count,
"signed_seat_count": signed_seat_count,
@@ -2873,6 +2873,8 @@ def get_price_per_license(
price_map: Dict[int, Dict[str, int]] = {
CustomerPlan.TIER_CLOUD_STANDARD: {"Annual": 8000, "Monthly": 800},
CustomerPlan.TIER_CLOUD_PLUS: {"Annual": 16000, "Monthly": 1600},
+ # Placeholder self-hosted plan for development.
+ CustomerPlan.TIER_SELF_HOSTED_BUSINESS: {"Annual": 8000, "Monthly": 800},
}
try:
diff --git a/corporate/models.py b/corporate/models.py
index 3a1faf6f94f..cf8a08dbd21 100644
--- a/corporate/models.py
+++ b/corporate/models.py
@@ -293,6 +293,7 @@ class CustomerPlan(models.Model):
CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard",
CustomerPlan.TIER_CLOUD_PLUS: "Zulip Plus",
CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise",
+ CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Self-Hosted Business",
}[tier]
@property
diff --git a/corporate/views/upgrade.py b/corporate/views/upgrade.py
index 5ed43e232af..1c5ec12507c 100644
--- a/corporate/views/upgrade.py
+++ b/corporate/views/upgrade.py
@@ -205,7 +205,7 @@ def remote_realm_upgrade_page(
) -> HttpResponse: # nocoverage
initial_upgrade_request = InitialUpgradeRequest(
manual_license_management=manual_license_management,
- tier=CustomerPlan.TIER_CLOUD_STANDARD,
+ tier=CustomerPlan.TIER_SELF_HOSTED_BUSINESS,
)
redirect_url, context = billing_session.get_initial_upgrade_context(initial_upgrade_request)
@@ -226,7 +226,7 @@ def remote_server_upgrade_page(
) -> HttpResponse: # nocoverage
initial_upgrade_request = InitialUpgradeRequest(
manual_license_management=manual_license_management,
- tier=CustomerPlan.TIER_CLOUD_STANDARD,
+ tier=CustomerPlan.TIER_SELF_HOSTED_BUSINESS,
)
redirect_url, context = billing_session.get_initial_upgrade_context(initial_upgrade_request)
diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html
index 794cedbcdfa..75687c4b716 100644
--- a/templates/corporate/upgrade.html
+++ b/templates/corporate/upgrade.html
@@ -152,7 +152,7 @@
{% if free_trial_days %}
Start {{ free_trial_days }}-day free trial
{% else %}
- Purchase Zulip Cloud Standard
+ Purchase {{ plan }}
{% endif %}
</span>
<object class="loader upgrade-button-loader" type="image/svg+xml" data="{{ static('images/loading/loader-white.svg') }}"></object>