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.

corporate: Use the stripe checkout session metadata for free trials.

Lauryn Menard717d40475e0b
diff --git a/corporate/lib/stripe_event_handler.py b/corporate/lib/stripe_event_handler.py
index cece1f98bff..f9680175fa6 100644
--- a/corporate/lib/stripe_event_handler.py
+++ b/corporate/lib/stripe_event_handler.py
@@ -102,9 +102,9 @@ def handle_checkout_session_completed_event(
billing_session.update_or_create_stripe_customer(payment_method)
process_initial_upgrade(
user,
- int(stripe_setup_intent.metadata["licenses"]),
- stripe_setup_intent.metadata["license_management"] == "automatic",
- int(stripe_setup_intent.metadata["billing_schedule"]),
+ int(stripe_session.metadata["licenses"]),
+ stripe_session.metadata["license_management"] == "automatic",
+ int(stripe_session.metadata["billing_schedule"]),
charge_automatically=True,
free_trial=True,
)