react-native-binance-pay
TypeScript icon, indicating that this package has built-in type declarations

0.2.6 • Public • Published

react-native-binance-pay

React Native Package for Binance Pay from Binance SDKs

Installation

npm install react-native-binance-pay

Add dependencies

Android dependencies

  1. 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')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
     implementation project(':react-native-binance-pay')
    

iOS dependencies

  1. Create Frameworks folder in iOS project root folder and copy & paste the BinancePaySDK.xcframework
  2. 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

Package Sidebar

Install

npm i react-native-binance-pay

Weekly Downloads

2

Version

0.2.6

License

MIT

Unpacked Size

2.01 MB

Total Files

73

Last publish

Collaborators

  • cleverbrainz