1.1.7 • Published 4 years ago
react-native-direct-pay-card-payment v1.1.7
react-native-direct-pay-card-payment
Getting started
$ npm install react-native-direct-pay-card-payment --save
$ cd ios && pod install && cd ..
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-direct-pay-card-paymentand addRNDirectPayCardPayment.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNDirectPayCardPayment.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNDirectPayCardPaymentPackage;to the imports at the top of the file - Add
new RNDirectPayCardPaymentPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-direct-pay-card-payment' project(':react-native-direct-pay-card-payment').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-direct-pay-card-payment/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-direct-pay-card-payment')
Windows
- In Visual Studio add the
RNDirectPayCardPayment.slninnode_modules/react-native-direct-pay-card-payment/windows/RNDirectPayCardPayment.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Direct.Pay.Card.Payment.RNDirectPayCardPayment;to the usings at the top of the file - Add
new RNDirectPayCardPaymentPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import RNDirectPayCardPayment from 'react-native-direct-pay-card-payment';
// TODO: What to do with the module?
RNDirectPayCardPayment.addCardToUser(
'dev', //env : dev or prod
'e0e2c6e150775dff22e143af7ba234424', // apiKey
'FN02385', // mid
'8c1eeae8-07cb-4c7b-12334422e4q3', //unique id of the user
'Jhon', // firstname of the user
'Doe', // lastname of the user
'jhon@mail.com', // email of the user
'0730000001', // phone number of the user
(_err, _r) => {
if (_err) {
console.log('code: ' + _err.code);
console.log('message: ' + _err.message);
} else {
//successfully added the card
console.log('id: ' + _r.id); // id (token) of the added card
console.log('mask: ' + _r.mask); // masked card number
console.log('reference: ' + _r.reference); // unique user id as the reference
console.log('brand: ' + _r.brand); // brand of the card (Visa / Mastercared)
}
},
);;1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.1.2
4 years ago
0.0.28
4 years ago
1.0.6
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2-b
6 years ago
0.0.27
6 years ago
0.0.25
6 years ago
0.0.24
6 years ago
0.0.23
6 years ago
0.0.22
6 years ago
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.15
6 years ago
0.0.16
6 years ago
0.0.12
6 years ago
0.0.13
6 years ago
0.0.14
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.3
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
1.0.0
6 years ago