Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zo0r/react-native-conekta
React Native Conekta SDK for iOS and Android
https://github.com/zo0r/react-native-conekta
android conekta ios payment-gateway payment-integration payment-methods payments react-native
Last synced: 28 days ago
JSON representation
React Native Conekta SDK for iOS and Android
- Host: GitHub
- URL: https://github.com/zo0r/react-native-conekta
- Owner: zo0r
- License: mit
- Created: 2015-11-29T22:50:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T04:13:44.000Z (almost 3 years ago)
- Last Synced: 2024-11-08T19:52:37.605Z (about 1 month ago)
- Topics: android, conekta, ios, payment-gateway, payment-integration, payment-methods, payments, react-native
- Language: Objective-C
- Homepage: https://www.conekta.io
- Size: 39.1 KB
- Stars: 34
- Watchers: 5
- Forks: 22
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-conekta ★17 - Conekta SDK for React Native (Components / Integrations)
- awesome-react-native - react-native-conekta ★17 - Conekta SDK for React Native (Components / Integrations)
- awesome-react-native - react-native-conekta ★17 - Conekta SDK for React Native (Components / Integrations)
- awesome-react-native-ui - react-native-conekta ★3 - Conekta SDK for React Native (Components / Integrations)
- awesome-react-native - react-native-conekta ★17 - Conekta SDK for React Native (Components / Integrations)
README
# React Native Conekta [![npm version](https://d25lcipzij17d.cloudfront.net/badge.svg?id=js&type=6&v=2.0.3&x2=0)](http://badge.fury.io/js/react-native-conekta)
***React Native Conekta SDK for iOS and Android***
## Supported React Native Versions
| Component Version | RN Versions | README |
|-----------------------|---------------|------------|
| **1.0.4** | **<= 0.16** | [Open](https://github.com/zo0r/react-native-conekta/blob/0dae778f409123836df4ec0f6de484598658b11e/README.md) |
| **>= 2.0.0** | **>= 0.30** | [Open](https://github.com/zo0r/react-native-conekta/blob/master/README.md) |## Installation
`npm install --save react-native-conekta``react-native link`
## Usage
```javascript
var conektaApi = new Conekta();conektaApi.setPublicKey( 'YOUR_PUBLIC_KEY' );
conektaApi.createToken({
cardNumber: '4242424242424242',
name: 'Manolo Virolo',
cvc: '111',
expMonth: '11',
expYear: '21',
}, function(data){
console.log( 'DATA:', data ); // data.id to get the Token ID
}, function(){
console.log( 'Error!' );
});
```## iOS Manual Installation (if you did not use `react-native link`)
[Please see: Linking Libraries iOS](https://facebook.github.io/react-native/docs/linking-libraries-ios.html#content)Library folder: `your-project/node_modules/react-native-conekta/RNConekta`
## Android Manual Installation (if you did not use `react-native link`)
In `android/settings.gradle````gradle
...include ':react-native-conekta'
project(':react-native-conekta').projectDir = file('../node_modules/react-native-conekta/android')
```In `android/app/build.gradle`
```gradle
...dependencies {
...compile project(':react-native-conekta')
}
```Manually register module in `MainApplication.java`:
```java
import com.dieam.reactnativeconekta.ReactNativeConektaPackage; // <--- importpublic class MainApplication extends Application implements ReactApplication {
......
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}@Override
protected List getPackages() {return Arrays.asList(
new MainReactPackage(),
new ReactNativeConektaPackage() // <---- Add the Package
);
}
};....
}```