Comparing version 1.0.0-beta4 to 1.0.0-beta5
@@ -76,5 +76,5 @@ var _ = require('lodash'); | ||
Client.prototype.webhookValid = function webhookValid(params) { | ||
return Signer.verify(params, this.config.appSecret); | ||
return Signer.verify(params.payload, this.config.appSecret); | ||
}; | ||
module.exports = Client; |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "1.0.0-beta4", | ||
"version": "1.0.0-beta5", | ||
"author": { | ||
@@ -11,0 +11,0 @@ "name": "Andy Appleton", |
@@ -5,3 +5,3 @@ # GoCardless Node.js client library | ||
## Version 1.0.0-beta4 note | ||
## Version 1.0.0-beta5 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. |
@@ -231,7 +231,9 @@ var sinon = require('sinon'); | ||
sinon.spy(Signer, 'verify'); | ||
var params = { some: 'data' }; | ||
var params = { | ||
payload: { some: 'data' } | ||
}; | ||
client.webhookValid(params); | ||
expect(Signer.verify).was.calledWith(params, config.appSecret); | ||
expect(Signer.verify).was.calledWith(params.payload, config.appSecret); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52625
1409