Skip to content

cuidamimascota/react-native-conekta

Repository files navigation

react-native-conekta npm version

⚠️ NOT OFFICIAL

Getting started

Using npm:

npm install --save @cuidamimascota/react-native-conekta

or using yarn:

yarn add @cuidamimascota/react-native-conekta
cd ios
pod install

⚠️ React Native >=0.60.0

Usage

import Conekta from '@cuidamimascota/react-native-conekta';
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!' );
});