Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gocardless

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gocardless - npm Package Compare versions

Comparing version 1.0.0-beta5 to 1.0.0-beta6

12

lib/resources/shared/connect-behaviour.js

@@ -10,2 +10,10 @@ var crypto = require('crypto');

var state = params.state;
var cancel_uri = params.cancel_uri;
var redirect_uri = params.redirect_uri;
delete params.state;
delete params.cancel_uri;
delete params.redirect_uri;
var query = {

@@ -18,2 +26,6 @@ client_id: this.opts.appId,

state && (query.state = state);
cancel_uri && (query.cancel_uri = cancel_uri);
redirect_uri && (query.redirect_uri = redirect_uri);
var signature = Signer.toQuery(query);

@@ -20,0 +32,0 @@ query.signature = Signer.sign(signature, this.opts.secret);

2

package.json

@@ -8,3 +8,3 @@ {

],
"version": "1.0.0-beta5",
"version": "1.0.0-beta6",
"author": {

@@ -11,0 +11,0 @@ "name": "Andy Appleton",

@@ -5,3 +5,3 @@ # GoCardless Node.js client library

## Version 1.0.0-beta5 note
## Version 1.0.0-beta6 note

@@ -8,0 +8,0 @@ This replaces the previous [gocardless npm module](https://npmjs.org/package/gocardless/0.1.1) and is not API compatible. It will be released as 1.0.

@@ -92,4 +92,32 @@ var url = require('url');

});
describe('non-preauth, subscription or bill parms', function() {
beforeEach(function() {
params = {
amount: '10',
state: 'id=123',
redirect_uri: 'http://example.com/redirect',
cancel_uri: 'http://example.com/cancel'
};
queryString = url.parse(resource.newUrl(params)).query;
parsedQuery = qs.parse(queryString);
});
it('extracts state out of the resource params', function() {
expect(parsedQuery.state).to.be('id=123');
expect(parsedQuery[resource.paramName].state).to.be(undefined);
});
it('extracts redirect_uri out of the resource params', function() {
expect(parsedQuery.redirect_uri).to.be('http://example.com/redirect');
expect(parsedQuery[resource.paramName].redirect_uri).to.be(undefined);
});
it('extracts cancel_uri out of the resource params', function() {
expect(parsedQuery.cancel_uri).to.be('http://example.com/cancel');
expect(parsedQuery[resource.paramName].cancel_uri).to.be(undefined);
});
});
});
});
};
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