New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

classy-pay-client

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classy-pay-client - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

index.js
'use strict';
const request = require('request');
const _ = require('lodash');
let apiUrl;

@@ -8,2 +9,3 @@ let token;

let HmacAuthorize;
let errorNok;

@@ -26,7 +28,15 @@ function payRequest(appId, method, resource, payload, callback) {

request(options, function(error, response, body) {
if (!error && response.statusCode === 200) {
let status = _.get(response, 'statusCode');
let errorResponse = {
status,
error,
response,
body
};
if (status === 200) {
callback(null, body ? JSON.parse(body) : {});
} else if (errorNok) {
callback(errorResponse);
} else {
callback(error || 'Response was not 200 OK: ' +
JSON.stringify(response, null, 2));
callback(null, errorResponse);
}

@@ -45,2 +55,3 @@ });

timeout = config.timeout;
errorNok = config.errorNok || true,
HmacAuthorize = require('authorization-hmac256')({

@@ -47,0 +58,0 @@ service: 'CWS',

3

package.json
{
"name": "classy-pay-client",
"version": "1.0.0",
"version": "1.0.1",
"description": "Client for Classy Pay.",

@@ -26,2 +26,3 @@ "main": "index.js",

"authorization-hmac256": "^1.0.0",
"lodash": "^4.17.4",
"request": "^2.81.0"

@@ -28,0 +29,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc