Setup
Learn how to set up the React Native SDK.
This package is published privately to GitHub packages.
Before you begin
Before using our React Native SDK, you must authenticate npm
or yarn
with GitHub.
Adding dependencies
To add the dependencies to your environment:
- Add the package to your project.
npm install https://github.com/dojo-engineering/react-native-pay-sdk/
- According to your environment, add the following dependencies to your project:
- iOS
- Android
Add the native dependencies to your Podfile:
loading...
Add the native dependencies to your apps build.gradle:
loading...
Add the necessary repositories to retrieve the dependencies:
loading...
You must set the credentials for accessing both repositories in your ~/.gradle/gradle.properties
:
cardinal.user={cardinal user}
cardinal.key={cardinal password}
Add the following code to your apps MainActivity.java
:
import com.dojoreactnativepaysdk.DojoPay;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DojoPay.init(this);
}
Ensure that you exclude payment-related fields from tracking if you are using screen recording or session recording services like LogRocket or UXCam. You can do that by setting themeSettings.analyticsExcludedFieldsIdentifier
with your identifier value.