Browse Source

Sales Tax for Premium signups (#1087)

* Started charging sales tax on Premium signups

* added a line break
pull/1091/head
Addison Beck 5 years ago committed by GitHub
parent
commit
c9cab74476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      src/Core/Services/Implementations/StripePaymentService.cs

16
src/Core/Services/Implementations/StripePaymentService.cs

@ -444,6 +444,22 @@ namespace Bit.Core.Services @@ -444,6 +444,22 @@ namespace Bit.Core.Services
Quantity = 1,
});
var taxRates = await _taxRateRepository.GetByLocationAsync(
new Bit.Core.Models.Table.TaxRate()
{
Country = customer.Address.Country,
PostalCode = customer.Address.PostalCode
}
);
var taxRate = taxRates.FirstOrDefault();
if (taxRate != null)
{
subCreateOptions.DefaultTaxRates = new List<string>(1)
{
taxRate.Id
};
}
if (additionalStorageGb > 0)
{
subCreateOptions.Items.Add(new SubscriptionItemOptions

Loading…
Cancel
Save