mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Stripe Connect: Fix account name retrieval (#2857)
This commit is contained in:
@@ -165,9 +165,15 @@ def oauth_return(request, *args, **kwargs):
|
||||
event.settings.payment_stripe_connect_refresh_token = data['refresh_token']
|
||||
event.settings.payment_stripe_connect_user_id = data['stripe_user_id']
|
||||
event.settings.payment_stripe_merchant_country = account.get('country')
|
||||
if account.get('business_name') or account.get('display_name') or account.get('email'):
|
||||
if (
|
||||
account.get('business_profile', {}).get('name')
|
||||
or account.get('settings', {}).get('dashboard', {}).get('display_name')
|
||||
or account.get('email')
|
||||
):
|
||||
event.settings.payment_stripe_connect_user_name = (
|
||||
account.get('business_name') or account.get('display_name') or account.get('email')
|
||||
account.get('business_profile', {}).get('name')
|
||||
or account.get('settings', {}).get('dashboard', {}).get('display_name')
|
||||
or account.get('email')
|
||||
)
|
||||
|
||||
if data['livemode']:
|
||||
|
||||
Reference in New Issue
Block a user