mirror of https://github.com/zulip/zulip.git
corporate: Consistently use delivery_email for billing.
This is yet another corner case where EMAIL_ADDRESS_VISIBILITY_ADMINS broke existing code.
This commit is contained in:
parent
6d17fea076
commit
f83871c182
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue