Socket
Socket
Sign inDemoInstall

connect-sdk-nodejs

Package Overview
Dependencies
127
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.11.0 to 3.12.0

2

package.json
{
"name": "connect-sdk-nodejs",
"version": "3.11.0",
"version": "3.12.0",
"description": "SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -1488,2 +1488,5 @@ {

},
"requiresApproval" : {
"type" : "boolean"
},
"token" : {

@@ -1939,2 +1942,5 @@ "type" : "string"

},
"requiresApproval" : {
"type" : "boolean"
},
"token" : {

@@ -1941,0 +1947,0 @@ "type" : "string"

@@ -96,7 +96,5 @@ var _ = require('lodash');

} catch (e) {
cb({
status: response.statusCode,
message: e.message,
body: body
}, null);
e.status = response.statusCode;
e.body = body;
cb(e, null);
}

@@ -103,0 +101,0 @@ });

@@ -85,17 +85,11 @@ var http = require('http');

if (!postData[key].fileName) {
cb({
message: key + ': fileName is required'
}, null);
cb(new Error(key + ': fileName is required'), null);
return;
}
if (!postData[key].contentType) {
cb({
message: key + ': contentType is required'
}, null);
cb(new Error(key + ': contentType is required'), null);
return;
}
if (!postData[key].content) {
cb({
message: key + ': content is required'
}, null);
cb(new Error(key + ': content is required'), null);
return;

@@ -102,0 +96,0 @@ }

@@ -12,3 +12,3 @@ var dateformat = require('dateformat');

'sdkCreator': 'Ingenico',
'sdkIdentifier': 'NodejsServerSDK/v3.11.0',
'sdkIdentifier': 'NodejsServerSDK/v3.12.0',
'platformIdentifier': process.env['OS'] + ' Node.js/' + process.versions.node

@@ -28,3 +28,3 @@ }

var isBinaryContent = function (contentType) {
return contentType
return !!contentType
&& !contentType.startsWith("text/")

@@ -31,0 +31,0 @@ && contentType.indexOf("json") == -1

@@ -15,3 +15,3 @@ var crypto = require('crypto');

try {
event = JSON.parse(body);
var event = JSON.parse(body);
validateApiVersion(event);

@@ -45,3 +45,3 @@ cb(null, event);

if (error) {
cb(error, null);
cb(error);
} else {

@@ -104,3 +104,3 @@ var expectedSignature = crypto.createHmac('sha256', secretKey).update(body).digest('base64');

getSecretKey: function (keyId, cb) {
secretKey = secretKeyStore[keyId];
var secretKey = secretKeyStore[keyId];
if (!secretKey) {

@@ -107,0 +107,0 @@ var e = new Error('could not find secret key for key id ' + keyId);

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