Skip to main content

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?

Don't waste precious time on plugin issues.

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#

$ npm install com.paytabs.cordova.plugin $ npm install @ionic-native/paytabs $ ionic cap sync

Supported Platforms#

  • Android
  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { 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));