
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-juno
Advanced tools
React Native Bridge for Juno's SDK. For more information, visit the official Android or iOS repositories.
$ npm install react-native-juno --save
$ cd ios && pod install
Run this at the root of your project to make it compatible with Swift.
$ npm install react-native-swift
$ react-native swiftify
Keep in mind that this lib requires at least Swift 4 and Deployment Target 11.0.
In your AndroidManifest.xml add permission for internet and your public token.
<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<application
...
android:name=".MainApplication"
...>
<meta-data
android:name="br.com.juno.directcheckout.public_token"
android:value="YOUR_PUBLIC_TOKEN"/>
...
</application>
</manifest>
$ react-native link react-native-juno
Libraries ➜ Add Files to [your project's name]node_modules ➜ react-native-juno and add RNJuno.xcodeprojlibRNJuno.a to your project's Build Phases ➜ Link Binary With LibrariesCmd+R)<android/app/src/main/java/[...]/MainActivity.javaimport com.reactnative.juno.RNJunoPackage; to the imports at the top of the filenew RNJunoPackage() to the list returned by the getPackages() methodandroid/settings.gradle:
include ':react-native-juno'
project(':react-native-juno').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-juno/android')
android/app/build.gradle:
compile project(':react-native-juno')
Most of the functions detailed on the official documentation were implemented on this bridge. Here is some examples of each one of them.
import RNJuno from 'react-native-juno';
// You need to initialize the SDK before using the card hash method.
// The first parameter is your public key. This can be null on Android since it's already declared on the Manifest file.
// The second parameter is whether to run it on production or Sandbox. TRUE for production, FALSE for sandbox.
RNJuno.initialize("AC2261A2ECC7FD90D205502092571F5C1C0831935E35073AA95AEBEB68D7E5C5", true);
// This function returns a hash for the credit card informed.
// The first parameter is the Credit Card Number.
// The second parameter is the Holders Name.
// The third parameter is the Security Code.
// The fourth parameter is the Expiration Month.
// The fifth parameter is the Expiration Year.
// The sixth parameter is a callback function, containing the error message as the first parameter (String) and the hash as the second parameter (String).
RNJuno.getCardHash("5362682003164890", "Rafael Althaus", "123", "01", "2025", (error, data) => {
if (error) {
console.log("ERROR: " + error);
} else {
console.log("HASH: " + data);
}
});
// Returns if the card number is valid.
// The first parameter is the card number.
// The second parameter is a callback function informing if the number is valid as TRUE of FALSE.
RNJuno.isValidCardNumber("5362682003164890", (data) => {
console.log("VALID CARD NUMBER: " + data);
});
// Returns if the expire date is valid.
// The first parameter is the month number.
// The second parameter is the year number.
// The third parameter is a callback function informing if the date is valid as TRUE of FALSE.
RNJuno.isValidExpireDate("01", "2025", (data) => {
console.log("VALID EXPIRE DATE: " + data);
});
// Returns if the security code is valid.
// The first parameter is the security code.
// The second parameter is the card number.
// The third parameter is a callback function informing if the security code is valid as TRUE of FALSE.
RNJuno.isValidSecurityCode("123", "5362682003164890", (data) => {
console.log("VALID SECURITY CODE: " + data);
});
getCardType function because it was declared as private on the SDK;retrofit2 as a dependency is this project since it's needed in the SDK and it's not declared in it;All contributions are welcome! Let's maintain this project as up-to-date and bug free as possible. If you're having any trouble, feel free to open an issue, I'll respond ASAP.
FAQs
React Native Bridge para o SDK de criptografia e validação da Juno.
We found that react-native-juno demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.