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:
@ -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,
|
||||
|
Reference in New Issue
Block a user