Skip to content

Commit

Permalink
rebranded
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Leighton committed Jun 7, 2022
1 parent a7a0f6f commit 840d0d0
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

import com.google.gson.Gson;

public class RNCardConnectReactLibraryModule extends ReactContextBaseJavaModule {
public class RNBoltReactLibraryModule extends ReactContextBaseJavaModule {

private static final String TAG = "CardConnect";
private static final String TAG = "BoltSDK";

public RNCardConnectReactLibraryModule(ReactApplicationContext reactContext) {
public RNBoltReactLibraryModule(ReactApplicationContext reactContext) {
super(reactContext);
}

@Override
public String getName() {
return "CardConnect";
return "BoltSDK";
}

@ReactMethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.bridge.JavaScriptModule;
public class RNCardConnectReactLibraryPackage implements ReactPackage {

public class RNBoltReactLibraryPackage implements ReactPackage {
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
return Arrays.<NativeModule>asList(new RNCardConnectReactLibraryModule(reactContext));
return Arrays.<NativeModule>asList(new RNBoltReactLibraryModule(reactContext));
}

// Deprecated from RN 0.47
Expand Down
5 changes: 5 additions & 0 deletions bolt_sdk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { NativeModules } from 'react-native';

const { BoltSDK } = NativeModules;

export default BoltSDK;
5 changes: 0 additions & 5 deletions card_connect.js

This file was deleted.

13 changes: 8 additions & 5 deletions example/App.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import React, {Component} from 'react';
import {StyleSheet, Text, View} from 'react-native';
import CardConnect from 'react-native-card-connect';
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import BoltSDK from 'react-native-card-connect';

export default class App extends Component {

state = {
status: 'starting',
message: '--'
};

componentDidMount() {
this.tokenizeCard()
}

async tokenizeCard() {

try {
Expand All @@ -19,9 +22,9 @@ export default class App extends Component {
const expiryDate = '12/22';
const cVc = "123";

CardConnect.setupConsumerApiEndpoint(`https://${siteId}.cardconnect.com`);
BoltSDK.setupConsumerApiEndpoint(`https://${siteId}.cardconnect.com`);

const token = await CardConnect.getCardToken(
const token = await BoltSDK.getCardToken(
cardNumber,
expiryDate,
cVc
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "React Native Card Connect",
"description": "Boilerplate library. Tokenize Credit/Debit Card info using Cardconnect Native SDKs",
"version": "1.0.0",
"main": "card_connect.js",
"main": "bolt_sdk.js",
"repository": {
"type": "git",
"url": "git+https://github.com/brij-dev/react-native-card-connect.git",
Expand Down

0 comments on commit 840d0d0

Please sign in to comment.