rn-native-adyen-encrypt
v1.3.6
Published
Cross platform way to encrypt cards for use with Adyen (www.adyen.com) on react native
Downloads
11
Readme
react-native-adyen-encrypt
Getting started
iOS
- Install package with
$ npm install react-native-adyen-encrypt --save
- modify
ios/Podfile
so thatplatform :ios
is >= 10 - your iOS project will need to have a Swift bridging header. Easiest way to do this is to add a swift file to the project. This file must remain in the project 😢
- Verify that your SWIFT_VERSION is >= 5
pod install
iOS uses Adyen SDK version 4.4.0
Android
- Install package with
$ npm install react-native-adyen-encrypt --save
- That should be it 😅
Android uses Adyen SDK version 4.4.0
Usage
Example App
https://github.com/voomflights/react-native-adyen-encrypt-example
Code Snippet
import {AdyenEncryptor, CardForm} from 'react-native-adyen-encrypt'
const cardForm: CardForm = {
cardNumber: "654654654654654",
securityCode: "999",
expiryMonth: "13",
expiryYear: "1999" // note 4 digit year
}
const encryptor = new AdyenEncryptor(ADYEN_PUBLIC_KEY)
const promise = encryptor.encryptCard(cardForm)
promise.then((data: EncryptedCard) => {
// do something neat
})
Redirect component
Check documentation for native code changes required to support redirects https://docs.adyen.com/checkout/android/components#redirect-component
VISA certificate update
Since 1st february VISA requires a new certificate to 3DS2. The upgrade to version 4.4.0 solves the problem. You can see more in the link below: https://docs.adyen.com/online-payments/visa-root-certificate-update#what-you-need-to-do