diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index da6a5c8f62..98e886907f 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -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) { } } diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs index c7386cf928..0250d29278 100644 --- a/src/Core/Services/Implementations/UserService.cs +++ b/src/Core/Services/Implementations/UserService.cs @@ -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) { } }