1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 17:12:49 -05:00

[PM-11730] Remove feature flag: AC-2476-deprecate-stripe-sources-api (#5201)

* Removed feature flag

* Run dotnet format

* Fix integration tests
This commit is contained in:
Alex Morask
2025-01-24 13:38:35 -05:00
committed by GitHub
parent 99a1dbbe02
commit f140c7f6c1
9 changed files with 43 additions and 119 deletions

View File

@ -224,27 +224,8 @@ public class UpgradeOrganizationPlanCommand : IUpgradeOrganizationPlanCommand
if (string.IsNullOrWhiteSpace(organization.GatewaySubscriptionId))
{
if (_featureService.IsEnabled(FeatureFlagKeys.AC2476_DeprecateStripeSourcesAPI))
{
var sale = OrganizationSale.From(organization, upgrade);
await _organizationBillingService.Finalize(sale);
}
else
{
try
{
paymentIntentClientSecret = await _paymentService.UpgradeFreeOrganizationAsync(organization,
newPlan, upgrade);
success = string.IsNullOrWhiteSpace(paymentIntentClientSecret);
}
catch
{
await _paymentService.CancelAndRecoverChargesAsync(organization);
organization.GatewayCustomerId = null;
await _organizationService.ReplaceAndUpdateCacheAsync(organization);
throw;
}
}
var sale = OrganizationSale.From(organization, upgrade);
await _organizationBillingService.Finalize(sale);
}
else
{