1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

[PM-16979] Avoid returning BillingTaxIdTypeInterferenceError when an … (#5252)

* [PM-16979] Avoid returning BillingTaxIdTypeInterferenceError when an empty tax id string is passed

* tests

* fix tests
This commit is contained in:
Jonas Hendrickx
2025-01-15 16:05:27 +01:00
committed by GitHub
parent a3e3c7f96c
commit cc2128c97a
2 changed files with 73 additions and 2 deletions

View File

@ -119,7 +119,7 @@ public class StripePaymentService : IPaymentService
Subscription subscription;
try
{
if (taxInfo.TaxIdNumber != null && taxInfo.TaxIdType == null)
if (!string.IsNullOrWhiteSpace(taxInfo.TaxIdNumber))
{
taxInfo.TaxIdType = _taxService.GetStripeTaxCode(taxInfo.BillingAddressCountry,
taxInfo.TaxIdNumber);
@ -2058,7 +2058,7 @@ public class StripePaymentService : IPaymentService
}
}
if (!string.IsNullOrEmpty(parameters.TaxInformation.TaxId))
if (!string.IsNullOrWhiteSpace(parameters.TaxInformation.TaxId))
{
var taxIdType = _taxService.GetStripeTaxCode(
options.CustomerDetails.Address.Country,