diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index d6c2ed1647..690edb8175 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -178,7 +178,7 @@ def do_create_stripe_customer(user: UserProfile, stripe_token: Optional[str]=Non # customer that we can delete or ignore. stripe_customer = stripe.Customer.create( description="%s (%s)" % (realm.string_id, realm.name), - email=user.email, + email=user.delivery_email, metadata={'realm_id': realm.id, 'realm_str': realm.string_id}, source=stripe_token) event_time = timestamp_to_datetime(stripe_customer.created) @@ -298,7 +298,7 @@ def process_initial_upgrade(user: UserProfile, licenses: int, automanage_license currency='usd', customer=customer.stripe_customer_id, description="Upgrade to Zulip Standard, ${} x {}".format(price_per_license/100, licenses), - receipt_email=user.email, + receipt_email=user.delivery_email, statement_descriptor='Zulip Standard') # Not setting a period start and end, but maybe we should? Unclear what will make things # most similar to the renewal case from an accounting perspective. diff --git a/corporate/views.py b/corporate/views.py index 3fd8a2eff0..23c296bf43 100644 --- a/corporate/views.py +++ b/corporate/views.py @@ -129,7 +129,7 @@ def initial_upgrade(request: HttpRequest) -> HttpResponse: signed_seat_count, salt = sign_string(str(seat_count)) context = { 'publishable_key': STRIPE_PUBLISHABLE_KEY, - 'email': user.email, + 'email': user.delivery_email, 'seat_count': seat_count, 'signed_seat_count': signed_seat_count, 'salt': salt,