mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
dont send token when null
This commit is contained in:
parent
22727b5abe
commit
cdfd828a8b
@ -79,7 +79,9 @@ export class PremiumComponent implements OnInit {
|
|||||||
this.formPromise = this.paymentComponent.createPaymentToken().then((result) => {
|
this.formPromise = this.paymentComponent.createPaymentToken().then((result) => {
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('paymentMethodType', result[1].toString());
|
fd.append('paymentMethodType', result[1].toString());
|
||||||
fd.append('paymentToken', result[0]);
|
if (result[0] != null) {
|
||||||
|
fd.append('paymentToken', result[0]);
|
||||||
|
}
|
||||||
fd.append('additionalStorageGb', (this.additionalStorage || 0).toString());
|
fd.append('additionalStorageGb', (this.additionalStorage || 0).toString());
|
||||||
return this.apiService.postPremium(fd);
|
return this.apiService.postPremium(fd);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<i class="fa fa-spinner fa-spin text-muted" *ngIf="!firstLoaded && loading" title="{{'loading' | i18n}}"></i>
|
<i class="fa fa-spinner fa-spin text-muted" *ngIf="!firstLoaded && loading" title="{{'loading' | i18n}}"></i>
|
||||||
<ng-container *ngIf="billing">
|
<ng-container *ngIf="billing">
|
||||||
<h2>{{(isCreditBalance ? 'accountCredit' : 'accountBalance') | i18n}}</h2>
|
<h2>{{(isCreditBalance ? 'accountCredit' : 'accountBalance') | i18n}}</h2>
|
||||||
<p><strong>{{creditOrBalance | currency:'$'}}</strong></p>
|
<p class="text-lg"><strong>{{creditOrBalance | currency:'$'}}</strong></p>
|
||||||
<p>{{'creditAppliedDesc' | i18n}}</p>
|
<p>{{'creditAppliedDesc' | i18n}}</p>
|
||||||
<button type="button" class="btn btn-outline-secondary" (click)="addCredit()" *ngIf="!showAddCredit">
|
<button type="button" class="btn btn-outline-secondary" (click)="addCredit()" *ngIf="!showAddCredit">
|
||||||
{{'addCredit' | i18n}}
|
{{'addCredit' | i18n}}
|
||||||
|
Loading…
Reference in New Issue
Block a user