Skip to content

BigRoomTechnologies/react-native-card-connect

 
 

Repository files navigation

react-native-card-connect

Getting started

$ npm install react-native-card-connect --save

Mostly automatic installation

For RN Version < 0.60 (no autolinking)

$ react-native link react-native-card-connect

For RN Version > 0.60 (with autolinking) nothing needs to be done other than installing the package.

Add pod 'RNCardConnectReactLibrary', :path => '../node_modules/react-native-card-connect' in your pod file for ios

Usage

import CardConnect from 'react-native-card-connect';
import moment from 'moment';

  async tokenizeCard() {

    try {

      const siteId = "fts";
      const cardNumber = "42424242424242";
      const expiryDate = moment('12/22', 'MM/YY').toISOString();
      const cVc = "123";

      CardConnect.setupConsumerApiEndpoint(siteId + ".cardconnect.com:443");

      const token = await CardConnect.getCardToken(
        cardNumber,
        expiryDate,
        cVc
      );

      console.log(token)

    } catch (error) {

      console.log(error.toString());

    }
  }

Additional Information

CardConnect Mobile SDK

About

React Native library for Card connect account tokenization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 68.5%
  • Java 21.3%
  • JavaScript 6.9%
  • Starlark 1.3%
  • Ruby 1.1%
  • Shell 0.9%