Socket
Socket
Sign inDemoInstall

node-adyen-encrypt

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.3.1

lib/0_1_18.js

4

index.js

@@ -6,6 +6,8 @@ const adyenEncrypt = (versionParam) => {

const availableVersions = [18, 22, 23, 24, 25];
const getVersion = (version) => {
return version && version >= 22 && version <= 25 ? version : 24;
return availableVersions.includes(version) ? version : 24;
};
module.exports = adyenEncrypt;
{
"name": "node-adyen-encrypt",
"version": "2.3.0",
"version": "2.3.1",
"description": "Adyen encryption for Node.js.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,3 @@ const adyenKey =

"5F024B3294A933F4DC514DE0B5686F6C2A6A2E";
const cardData = {

@@ -20,2 +21,3 @@ number: "5369 6587 0410 7605",

};
const validationResponse = {

@@ -35,2 +37,15 @@ valid: true,

describe("app()", () => {
it("should works with v18", () => {
const adyenEncrypt = require("../index")(18);
// apparently those weren't supported on v18?
delete cardData.generationtime;
delete validationResponse.generationtime;
const cseInstance = adyenEncrypt.createEncryption(adyenKey, {});
const validation = cseInstance.validate(cardData);
expect(validation).toEqual(validationResponse);
});
it("should works with v22", () => {

@@ -37,0 +52,0 @@ const adyenEncrypt = require("../index")(22);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc