mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
[PM-5766] Automatic Tax Feature Flag (#3729)
* Added feature flag constant * Wrapped Automatic Tax logic behind feature flag * Only getting customer if feature is anabled. * Enabled feature flag in unit tests * Made IPaymentService scoped * Added missing StripeFacade calls
This commit is contained in:
@ -139,8 +139,13 @@ public class OrganizationService : IOrganizationService
|
||||
}
|
||||
|
||||
await _paymentService.SaveTaxInfoAsync(organization, taxInfo);
|
||||
var updated = await _paymentService.UpdatePaymentMethodAsync(organization,
|
||||
paymentMethodType, paymentToken, taxInfo);
|
||||
var updated = await _paymentService.UpdatePaymentMethodAsync(
|
||||
organization,
|
||||
paymentMethodType,
|
||||
paymentToken,
|
||||
_featureService.IsEnabled(FeatureFlagKeys.PM5766AutomaticTax)
|
||||
? taxInfo
|
||||
: null);
|
||||
if (updated)
|
||||
{
|
||||
await ReplaceAndUpdateCacheAsync(organization);
|
||||
|
Reference in New Issue
Block a user