mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
cancel on delete
This commit is contained in:
parent
6d173385b0
commit
4ad1634d1d
@ -785,7 +785,9 @@ namespace Bit.Core.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
await _stripePaymentService.CancelSubscriptionAsync(organization, true);
|
||||
var eop = !organization.ExpirationDate.HasValue ||
|
||||
organization.ExpirationDate.Value >= DateTime.UtcNow;
|
||||
await _stripePaymentService.CancelSubscriptionAsync(organization, eop);
|
||||
}
|
||||
catch(GatewayException) { }
|
||||
}
|
||||
|
@ -205,10 +205,9 @@ namespace Bit.Core.Services
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(user.GatewaySubscriptionId))
|
||||
{
|
||||
var paymentService = user.GetPaymentService(_globalSettings);
|
||||
try
|
||||
{
|
||||
await paymentService.CancelSubscriptionAsync(user, true);
|
||||
await CancelPremiumAsync(user);
|
||||
}
|
||||
catch(GatewayException) { }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user