mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 19:14:32 -05:00
null checked Stripe.Customer.Address for org seat and storage upgrades (#1099)
This commit is contained in:
parent
fe4c36c04a
commit
001bbf2f2b
@ -415,6 +415,9 @@ namespace Bit.Core.Services
|
||||
};
|
||||
|
||||
var customer = await new CustomerService().GetAsync(sub.CustomerId);
|
||||
if (!string.IsNullOrWhiteSpace(customer?.Address?.Country)
|
||||
&& !string.IsNullOrWhiteSpace(customer?.Address?.PostalCode))
|
||||
{
|
||||
var taxRates = await _taxRateRepository.GetByLocationAsync(
|
||||
new Bit.Core.Models.Table.TaxRate()
|
||||
{
|
||||
@ -430,6 +433,7 @@ namespace Bit.Core.Services
|
||||
taxRate.Id
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var subResponse = await subscriptionService.UpdateAsync(sub.Id, subUpdateOptions);
|
||||
|
||||
|
@ -719,6 +719,9 @@ namespace Bit.Core.Services
|
||||
};
|
||||
|
||||
var customer = await new CustomerService().GetAsync(sub.CustomerId);
|
||||
if (!string.IsNullOrWhiteSpace(customer?.Address?.Country)
|
||||
&& !string.IsNullOrWhiteSpace(customer?.Address?.PostalCode))
|
||||
{
|
||||
var taxRates = await _taxRateRepository.GetByLocationAsync(
|
||||
new Bit.Core.Models.Table.TaxRate()
|
||||
{
|
||||
@ -734,6 +737,7 @@ namespace Bit.Core.Services
|
||||
taxRate.Id
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
var subResponse = await subscriptionService.UpdateAsync(sub.Id, subUpdateOptions);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user