Classic Adyen Client-Side Encryption (CSE) on Node
A NodeJS helper to encrypt data with the Adyen CSE
Prerequisites:
You will need a Adyen Key
Install
npm install node-adyen-encrypt
Specific Version import
const adyenEncrypt = require('node-adyen-encrypt');
const adyenEncrypt = require('node-adyen-encrypt')(25);
const adyenEncrypt = require('node-adyen-encrypt')(24);
const adyenEncrypt = require('node-adyen-encrypt')(23);
const adyenEncrypt = require('node-adyen-encrypt')(22);
Usage
const adyenEncrypt = require('node-adyen-encrypt');
const adyenKey = "your key as retrieved from the Adyen Customer Area Web Service User page";
const options = {};
const cardData = {
number : cardNumber,
cvc : cvc,
holderName : holderName,
expiryMonth : expiryMonth,
expiryYear : expiryYear,
generationtime : generationtime
};
const cseInstance = adyenEncrypt.createEncryption(adyenKey, options);
cseInstance.validate(cardData);
const dataEncrypted = cseInstance.encrypt(cardData);
Author
👤 Danilo Pedrosa
Show your support
Give a ⭐️ if this project helped you!