PayTabs
A plugin that allows you to use PayTabs's Native SDKs for Android and iOS.
https://github.com/paytabscom/paytabs-cordova
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install com.paytabs.cordova.plugin $ npm install @ionic-native/paytabs $ ionic cap sync
$ ionic cordova plugin add com.paytabs.cordova.plugin $ npm install @ionic-native/paytabs
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { PayTabs } from '@ionic-native/paytabs/ngx';
constructor(private paytabs: PayTabs) { }
...let billingDetails: PaymentSDKBillingDetails = { name: "John Smith", email: "email@domain.com", phone: "+201111111111", addressLine: "Address line", city: "Dubai", state: "Dubai", countryCode: "AE", zip: "1234" };
var configuration: PaymentSDKConfiguration = { profileID: "*profile id*", serverKey: "*server key*", clientKey: "*cleint key*", cartID: "12345", currency: "USD", cartDescription: "Flowers", merchantCountryCode: "ae", merchantName: "Flowers Store", amount: 20, screenTitle:"Pay with Card", billingDetails: billingDetails }
this.paytabs.startCardPayment(configuration) .then(result => console.log(result)) .catch(error => console.error(error));
this.paytabs.startApplePayPayment(configuration) .then(result => console.log(result)) .catch(error => console.error(error));
this.paytabs.startAlternativePaymentMethod(configuration) .then(result => console.log(result)) .catch(error => console.error(error));