diff --git a/src/app/accounts/addcredit/addcredit.page.ts b/src/app/accounts/addcredit/addcredit.page.ts index e713cbb..3e63230 100644 --- a/src/app/accounts/addcredit/addcredit.page.ts +++ b/src/app/accounts/addcredit/addcredit.page.ts @@ -27,6 +27,7 @@ export class AddcreditPage implements OnInit { isModalOpen:boolean = false; isModalOpenBackdrop:boolean = false; card_level:number=200; + flutterwave_key:string=''; @@ -115,6 +116,8 @@ export class AddcreditPage implements OnInit { } payViaPromise() { + this.paymentData.public_key = this.flutterwave_key; + this.flutterwave.asyncInlinePay(this.paymentData).then( (response) =>{ console.log("Promise Res" , response) @@ -162,7 +165,7 @@ export class AddcreditPage implements OnInit { console.log("startCreditResult TOTAL RETURN->", this.startCreditResult); if ( startCreditResult!=undefined && startCreditResult.credit_reference!='' ){ this.startCreditResult = startCreditResult; - + this.flutterwave_key = this.startCreditResult.flutterwave_key; this.isModalOpen = true; this.isModalOpenBackdrop= true; @@ -238,8 +241,10 @@ export class AddcreditPage implements OnInit { }); if(this.processor == 3030){ - debugger; + // debugger; + loading.present(); this.payViaPromise(); + return 0; } if (this.processor == 5000){ this.isProcessDisabled = true;