Skip to main content

AllInOneSDK

Paytm All-in-One SDK plugin for Cordova/Ionic Applications Paytm All-in-One SDK provides a swift, secure and seamless payment experience to your users by invoking the Paytm app (if installed on your user’s smartphone) to complete payment for your order. Paytm All-in-One SDK enables payment acceptance via Paytm wallet, Paytm Payments Bank, saved Debit/Credit cards, Net Banking, BHIM UPI and EMI as available in your customer’s Paytm account. If Paytm app is not installed on a customer's device, the transaction will be processed via web view within the All-in-One SDK. For more information about Paytm All-in-One SDK, please visit https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/

https://github.com/paytm/paytm-allinonesdk-ionic-cordova.git

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 cordova-paytm-allinonesdk
$ npm install @ionic-native/all-in-one-sdk
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { AllInOneSDK } from '@ionic-native/all-in-one-sdk/ngx';
constructor(private allInOneSDK: AllInOneSDK) { }
...
For below parameters see [documentation](https://developer.paytm.com/docs/all-in-one-sdk/hybrid-apps/cordova/)
let paymentIntent = { mid : merchantID, orderId: orderId, txnToken: transactionToken, amount: amount, isStaging: isStaging, callbackUrl:callBackURL, restrictAppInvoke:restrictAppInvoke }
this.allInOneSDK.startTransaction(paymentIntent)
.then((res: any) => console.log(res))
.catch((error: any) => console.error(error));

For iOS: After adding the plugin, open the iOS project, you can find the same at <projectName>/platforms/ios. In case merchant don’t have callback URL, Add an entry into Info.plist LSApplicationQueriesSchemes(Array) Item 0 (String)-> paytm Add a URL Scheme “paytm”+”MID”