Skip to content

Manual Installation Steps

Sachin Nautiyal edited this page Jan 22, 2020 · 1 revision

iOS

  1. $ npm i react-native-razorpay --save // Install the Razorpay React Native Standard SDK using the npm command.

  2. react-native link react-native-razorpay // Link the SDK with React Native Project using Xcode.

  3. Drag the Razorpay.framework file from the Libraries folder and drop it under the root folder, for more info follow this link, after this go to Target > General Settings> Framework, Libraries and Embedded Content section, set the Embed status of Razorpay.framework to Embed & Sign.

  4. Also make sure the razorpay framework is added in the embedded binaries section and you have Always Embed Swift Standard Binaries set to yes in build settings.

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.razorpay.rn.RazorpayPackage; to the imports at the top of the file
  • Add new RazorpayPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-razorpay'
    project(':react-native-razorpay').projectDir = new File(rootProject.projectDir,   '../node_modules/react-native-razorpay/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
    compile project(':react-native-razorpay')
Clone this wiki locally