Socket
Socket
Sign inDemoInstall

paddle-sdk

Package Overview
Dependencies
44
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.2.1

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.2.1"></a>
## [1.2.1](https://github.com/avaly/paddle-sdk/compare/v1.2.0...v1.2.1) (2019-06-18)
### Bug Fixes
* Throw on error responses with 2xx status code ([28f07da](https://github.com/avaly/paddle-sdk/commit/28f07da))
<a name="1.2.0"></a>

@@ -7,0 +17,0 @@ # [1.2.0](https://github.com/avaly/paddle-sdk/compare/v1.1.0...v1.2.0) (2018-03-23)

9

package.json
{
"name": "paddle-sdk",
"description": "The Paddle.com Node.js SDK",
"version": "1.2.0",
"version": "1.2.1",
"main": "sdk.js",

@@ -12,2 +12,9 @@ "author": "Valentin Agachi <github-com@agachi.name>",

"license": "MIT",
"keywords": [
"paddle",
"sdk",
"api",
"payments",
"subscriptions"
],
"engines": {

@@ -14,0 +21,0 @@ "node": ">=8.5.0"

13

sdk.js

@@ -52,8 +52,13 @@ const crypto = require('crypto');

let result = body;
if (result.success && result.response) {
result = result.response;
if (typeof body.success === 'boolean') {
if (body.success) {
return body.response || body;
}
throw new Error(
`Request ${url} returned an error! response=${JSON.stringify(body)}`
);
}
return result;
return body;
});

@@ -60,0 +65,0 @@ }

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