Socket
Socket
Sign inDemoInstall

stripe

Package Overview
Dependencies
Maintainers
1
Versions
652
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stripe - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

test/errors.js

12

lib/main.js

@@ -22,11 +22,15 @@ /* Copyright 2011 Ask Bjørn Hansen, see LICENSE */

function() {
var err = 200 == res.statusCode ? null : res.statusCode;
var err = null;
try {
response = JSON.parse(response);
if(200 != res.statusCode) {
err = new Error(response.error.message);
err.name = response.error.type;
response = null;
}
}
catch(e) {
err = 1;
response = { error : { message : "Invalid JSON from stripe.com" } };
err = new Error("Invalid JSON from stripe.com");
response = null;
}
err && (err = { statusCode: err, response: response });
callback(err, response);

@@ -33,0 +37,0 @@ });

@@ -5,3 +5,3 @@ {

"description": "Stripe API wrapper",
"version": "1.2.0",
"version": "1.3.0",
"homepage": "https://github.com/abh/node-stripe",

@@ -8,0 +8,0 @@ "repository": {

@@ -20,3 +20,3 @@ # node-stripe

if (err) {
console.log("Couldn't create the customer record");
console.log(err.message);
return;

@@ -32,3 +32,3 @@ }

All methods takes a callback as their last parameter. The callback is
called with an error code (if any) and then the response.
called with a Javascript `Error` (if any) and then the response.

@@ -35,0 +35,0 @@ * `stripe.charges` - create, retrieve, refund and list charges

Sorry, the diff of this file is not supported yet

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