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