1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

pass payment method type

This commit is contained in:
Kyle Spearrin
2019-02-19 17:06:01 -05:00
parent 0b1abc9ab0
commit 4fc90984d8
5 changed files with 17 additions and 10 deletions

View File

@@ -76,9 +76,10 @@ export class PremiumComponent implements OnInit {
return this.finalizePremium();
});
} else {
this.formPromise = this.paymentComponent.createPaymentToken().then((token) => {
this.formPromise = this.paymentComponent.createPaymentToken().then((result) => {
const fd = new FormData();
fd.append('paymentToken', token);
fd.append('paymentMethodType', result[1].toString());
fd.append('paymentToken', result[0]);
fd.append('additionalStorageGb', (this.additionalStorage || 0).toString());
return this.apiService.postPremium(fd);
}).then(() => {