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
1 changed files with 3 additions and 1 deletions

View File

@ -153,7 +153,9 @@ export class PaymentComponent implements OnInit {
createPaymentToken(): Promise<[string, PaymentMethodType]> {
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) => {
resolve([payload.nonce, this.method]);
}).catch((err: any) => {