-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Mr Tolu please assist me. I follow your steps on integrating paystack into ionic app.
But get error..."missing command error"...
I import InAppBrowser
import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
Then I included the same in app.module.ts provider
See the real code during the ChargeCard:
cardNumber: string='';
expiryMM:any='';
expiryYY:any='';
cvc:any='';
async ChargeCardAndSubmit(form:NgForm){
this.cardNumber = "4084084084084081";
this.expiryMM = 11;
this.expiryYY = 2018;
this.cvc = "408";
const loading = await this.loader.create({spinner: "dots",message: "Processing Charge..."});
await loading.present();
await this.platform.ready().then(() => {
if (this.platform.is('cordova')) {
(<any>window).window.PaystackPlugin.chargeCard(
(resp)=>{
loading.dismiss();
console.log('charge successful: ', resp.reference);
//this.api.postOrder(form).subscribe(res => {});
},(resp)=>{
loading.dismiss();
console.log('charge failed: '+this.cardNumber+", "+this.expiryMM+", "+this.expiryYY+", "+this.cvc+", "+resp);
},
{
cardNumber: this.cardNumber,
expiryMonth: this.expiryMM,
expiryYear: this.expiryYY,
cvc: this.cvc,
email: 'chargeIOS@master.dev',
amountInKobo: 150000
});
}else{
this.api.ShowNotification("Payment plugins not supported on this device","danger");
}
});
}
Metadata
Metadata
Assignees
Labels
No labels