Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stripe: Add user and org metadata to stripe payments.
Aman Agrawal081d94c4e892
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex e23fb415772..64a4e54d4fb 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -3144,8 +3144,11 @@ class RemoteRealmBillingSession(BillingSession):def update_data_for_checkout_session_and_payment_intent(self, metadata: Dict[str, Any]) -> Dict[str, Any]: # nocoverage- # TODO: Figure out what this should do.+ assert self.remote_billing_user is not Noneupdated_metadata = dict(+ remote_realm_user_id=self.remote_billing_user.id,+ remote_realm_user_email=self.get_email(),+ remote_realm_host=self.remote_realm.host,**metadata,)return updated_metadata@@ -3533,9 +3536,11 @@ class RemoteServerBillingSession(BillingSession):def update_data_for_checkout_session_and_payment_intent(self, metadata: Dict[str, Any]) -> Dict[str, Any]: # nocoverage+ assert self.remote_billing_user is not Noneupdated_metadata = dict(- server=self.remote_server,- email=self.get_email(),+ remote_server_user_id=self.remote_billing_user.id,+ remote_server_user_email=self.get_email(),+ remote_server_host=self.remote_server.hostname,**metadata,)return updated_metadata