1
0
mirror of https://github.com/bitwarden/web synced 2025-12-15 07:43:16 +00:00

Combine tax info with other updates

This commit is contained in:
Chad Scharf
2020-06-17 20:11:30 -04:00
parent 4502a966a1
commit 68d3d7abfd
4 changed files with 10 additions and 7 deletions

View File

@@ -78,7 +78,6 @@ export class PremiumComponent implements OnInit {
return this.finalizePremium();
});
} else {
await this.taxInfoComponent.submitTaxInfo();
this.formPromise = this.paymentComponent.createPaymentToken().then((result) => {
const fd = new FormData();
fd.append('paymentMethodType', result[1].toString());
@@ -86,6 +85,8 @@ export class PremiumComponent implements OnInit {
fd.append('paymentToken', result[0]);
}
fd.append('additionalStorageGb', (this.additionalStorage || 0).toString());
fd.append('country', this.taxInfoComponent.taxInfo.country);
fd.append('postalCode', this.taxInfoComponent.taxInfo.postalCode);
return this.apiService.postPremium(fd);
}).then((paymentResponse) => {
if (!paymentResponse.success && paymentResponse.paymentIntentClientSecret != null) {