react-native-binance-pay
v0.2.6
Published
Binance Pay SDK
Downloads
6
Readme
react-native-binance-pay
React Native Package for Binance Pay from Binance SDKs
Installation
npm install react-native-binance-pay
Add dependencies
Android dependencies
- Append the following lines to
android/settings.gradle
:include ':react-native-binance-pay' project(':react-native-binance-pay').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-binance-pay/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':react-native-binance-pay')
iOS dependencies
- Create Frameworks folder in iOS project root folder and copy & paste the BinancePaySDK.xcframework
- Add BinancePaySDK.xcframework to Frameworks, Libraries, and Embedded Content
Usage
- redirectScheme is the deeplink of you APP, you need this scheme to jump back from Binance APP
- redirectScheme is required for iOS only
import RNBinancePay from "react-native-binance-pay";
// ...
RNBinancePay.payCrypto(merchantId, prepayId, timeStamp, nonceStr, certSn, sign, redirectScheme)
.then((result) => {
console.log(result);
});
transferCrypto.payCrypto(orderId, type, redirectScheme)
.then((result) => {
console.log(result);
});
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT