mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
Prevent Stripe call when creating org from reseller in admin (#3953)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user