mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
catch gateway exception when canceling on delete
This commit is contained in:
parent
fceef7133e
commit
fb45f75bc8
@ -770,7 +770,11 @@ namespace Bit.Core.Services
|
|||||||
{
|
{
|
||||||
if(!string.IsNullOrWhiteSpace(organization.GatewaySubscriptionId))
|
if(!string.IsNullOrWhiteSpace(organization.GatewaySubscriptionId))
|
||||||
{
|
{
|
||||||
await _stripePaymentService.CancelSubscriptionAsync(organization, true);
|
try
|
||||||
|
{
|
||||||
|
await _stripePaymentService.CancelSubscriptionAsync(organization, true);
|
||||||
|
}
|
||||||
|
catch(GatewayException) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
await _organizationRepository.DeleteAsync(organization);
|
await _organizationRepository.DeleteAsync(organization);
|
||||||
|
@ -182,7 +182,11 @@ namespace Bit.Core.Services
|
|||||||
if(!string.IsNullOrWhiteSpace(user.GatewaySubscriptionId))
|
if(!string.IsNullOrWhiteSpace(user.GatewaySubscriptionId))
|
||||||
{
|
{
|
||||||
var paymentService = user.GetPaymentService(_globalSettings);
|
var paymentService = user.GetPaymentService(_globalSettings);
|
||||||
await paymentService.CancelSubscriptionAsync(user, true);
|
try
|
||||||
|
{
|
||||||
|
await paymentService.CancelSubscriptionAsync(user, true);
|
||||||
|
}
|
||||||
|
catch(GatewayException) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
await _userRepository.DeleteAsync(user);
|
await _userRepository.DeleteAsync(user);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user