1.2.2 • Published 16 days ago

paytm_allinone_react-native v1.2.2

Weekly downloads
172
License
MIT
Repository
github
Last release
16 days ago

paytm_allinone_react-native

This plugin exposes a single method to perform any transaction

Installation

npm install paytm_allinone_react-native --save
npx react-native link

Usage

    startTransaction(
        orderId: string,
        mid: string,
        txnToken: string,
        amount: string,
        callbackUrl: string,
        isStaging: boolean,
        restrictAppInvoke: boolean
    ): Promise<any>;

Configuration

Android

  1. Add the below line to the ‘repositories’ section of your project-level build.gradle file as below
allprojects {
    repositories {
        google()
        .
        .
        maven {
            url "https://artifactory.paytm.in/libs-release-local"
        }
    }
}

iOS

1: Open Podfile and Update Platform Version Navigate to the ios folder and open Podfile. You can do this using the following code. $ cd ios && open podfile.

2: Install Pods Using Cocoapods Install pods after updating iOS platform. : pod install && cd .. 3. Add the following in ios project. Open the projectName.workspace in ios folder. Open Info.plist : Add LSApplicationQueriesSchemes. Change its type to Array. Create a new item in it and set its value as "paytm"

Go to Info tab -> URL Types : Add a new URL Type that you’ll be using as the callback from Paytm App (URL Scheme: "paytm"+"MID"). Example: paytmMid123

Open AppDelegate.m: Add following method before the end of the file ended by @end Open AppDelegate.m and Import LinkingManager to the top of the file which has delegate methods for implementing and handling URLScheme(response from Paytm invoke will be received here in this method. Which in turns notifies the Plugin.)

#import <React/RCTLinkingManager.h>

Usage

  1. Import top-level package
import AllInOneSDKManager from 'paytm_allinone_react-native';
  1. Call the startTransaction api
    AllInOneSDKManager.startTransaction(
        orderId,
        mid,
        tranxToken,
        amount,
        callbackUrl,
        isStaging,
        appInvokeRestricted,
    )
    .then((result) => {
        console.log("result", result);
        updateUI(result);
    })
    .catch((err) => {
        handleError(err);
    });

For more details, please visit

https://developer.paytm.com/docs/all-in-one-sdk/

License

MIT

1.2.2

16 days ago

1.2.1

2 months ago

1.2.0

8 months ago

1.1.2

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago