-
Notifications
You must be signed in to change notification settings - Fork 107
Manual Installation Steps
Sachin Nautiyal edited this page Jan 22, 2020
·
1 revision
-
$ npm i react-native-razorpay --save
// Install the Razorpay React Native Standard SDK using the npm command. -
react-native link react-native-razorpay
// Link the SDK with React Native Project using Xcode. -
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. -
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.
- 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 thegetPackages()
method
- 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')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-razorpay')