mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 11:04:31 -05:00
Send upcoming invoice to provider billing email (#4112)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
parent
b2693913bf
commit
a9ab894893
@ -715,6 +715,23 @@ public class StripeController : Controller
|
||||
await SendEmails(new List<string> { user.Email });
|
||||
}
|
||||
}
|
||||
else if (providerId.HasValue)
|
||||
{
|
||||
var provider = await _providerRepository.GetByIdAsync(providerId.Value);
|
||||
|
||||
if (provider == null)
|
||||
{
|
||||
_logger.LogError(
|
||||
"Received invoice.Upcoming webhook ({EventID}) for Provider ({ProviderID}) that does not exist",
|
||||
parsedEvent.Id,
|
||||
providerId.Value);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await SendEmails(new List<string> { provider.BillingEmail });
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user