mirror of
https://github.com/bitwarden/server.git
synced 2025-02-22 02:51:33 +01:00
Prevent Stripe call when creating org from reseller in admin (#3953)
This commit is contained in:
parent
b164f24c99
commit
4af7780bb8
@ -382,10 +382,14 @@ public class ProviderService : IProviderService
|
||||
|
||||
organization.BillingEmail = provider.BillingEmail;
|
||||
await _organizationRepository.ReplaceAsync(organization);
|
||||
await _stripeAdapter.CustomerUpdateAsync(organization.GatewayCustomerId, new CustomerUpdateOptions
|
||||
|
||||
if (!string.IsNullOrEmpty(organization.GatewayCustomerId))
|
||||
{
|
||||
Email = provider.BillingEmail
|
||||
});
|
||||
await _stripeAdapter.CustomerUpdateAsync(organization.GatewayCustomerId, new CustomerUpdateOptions
|
||||
{
|
||||
Email = provider.BillingEmail
|
||||
});
|
||||
}
|
||||
|
||||
await _eventService.LogProviderOrganizationEventAsync(providerOrganization, EventType.ProviderOrganization_Added);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user