mirror of
https://github.com/bitwarden/server
synced 2026-01-06 10:34:01 +00:00
[PM-24350] fix tax calculation (#6251)
This commit is contained in:
@@ -218,7 +218,7 @@ public class StripeEventService : IStripeEventService
|
||||
|
||||
private static string GetCustomerRegion(IDictionary<string, string> customerMetadata)
|
||||
{
|
||||
const string defaultRegion = "US";
|
||||
const string defaultRegion = Core.Constants.CountryAbbreviations.UnitedStates;
|
||||
|
||||
if (customerMetadata is null)
|
||||
{
|
||||
|
||||
@@ -203,7 +203,7 @@ public class UpcomingInvoiceHandler(
|
||||
{
|
||||
var nonUSBusinessUse =
|
||||
organization.PlanType.GetProductTier() != ProductTierType.Families &&
|
||||
subscription.Customer.Address.Country != "US";
|
||||
subscription.Customer.Address.Country != Core.Constants.CountryAbbreviations.UnitedStates;
|
||||
|
||||
if (nonUSBusinessUse && subscription.Customer.TaxExempt != StripeConstants.TaxExempt.Reverse)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ public class UpcomingInvoiceHandler(
|
||||
Subscription subscription,
|
||||
string eventId)
|
||||
{
|
||||
if (subscription.Customer.Address.Country != "US" &&
|
||||
if (subscription.Customer.Address.Country != Core.Constants.CountryAbbreviations.UnitedStates &&
|
||||
subscription.Customer.TaxExempt != StripeConstants.TaxExempt.Reverse)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user