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.

stripe_event_handler: Rename get_billing_session.

Aman Agrawal953f0f436e13
diff --git a/corporate/lib/stripe_event_handler.py b/corporate/lib/stripe_event_handler.py
index 63cc0b2be58..d9b2f634851 100644
--- a/corporate/lib/stripe_event_handler.py
+++ b/corporate/lib/stripe_event_handler.py
@@ -63,7 +63,7 @@ def error_handler(
return wrapper
-def get_billing_session(
+def get_billing_session_for_stripe_webhook(
customer: Customer, user_id: Optional[str]
) -> Union[RealmBillingSession, RemoteRealmBillingSession, RemoteServerBillingSession]:
if customer.remote_realm is not None: # nocoverage
@@ -87,7 +87,7 @@ def handle_checkout_session_completed_event(
assert isinstance(stripe_session.setup_intent, str)
assert stripe_session.metadata is not None
stripe_setup_intent = stripe.SetupIntent.retrieve(stripe_session.setup_intent)
- billing_session = get_billing_session(session.customer, stripe_session.metadata.get("user_id"))
+ billing_session = get_billing_session_for_stripe_webhook(session.customer, stripe_session.metadata.get("user_id"))
payment_method = stripe_setup_intent.payment_method
assert isinstance(payment_method, (str, type(None)))