1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-29 07:59:42 +01:00

support credit on get token method

This commit is contained in:
Kyle Spearrin 2019-02-20 20:39:40 -05:00
parent 041cf1268d
commit 22727b5abe

View File

@ -153,7 +153,9 @@ export class PaymentComponent implements OnInit {
createPaymentToken(): Promise<[string, PaymentMethodType]> { createPaymentToken(): Promise<[string, PaymentMethodType]> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (this.method === PaymentMethodType.PayPal) { if (this.method === PaymentMethodType.Credit) {
resolve([null, this.method]);
} else if (this.method === PaymentMethodType.PayPal) {
this.btInstance.requestPaymentMethod().then((payload: any) => { this.btInstance.requestPaymentMethod().then((payload: any) => {
resolve([payload.nonce, this.method]); resolve([payload.nonce, this.method]);
}).catch((err: any) => { }).catch((err: any) => {