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

paypal-nvp-api

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paypal-nvp-api - npm Package Compare versions

Comparing version 1.2.0 to 1.2.2

18

package.json
{
"version": "1.2.0",
"version": "1.2.2",
"name": "paypal-nvp-api",

@@ -17,10 +17,13 @@ "description": "Node.js wrapper for the Paypal Name-Value Pair — NVP ",

"lint": "eslint ./src ./test",
"pretest": "npm run lint",
"test": "nyc tape test/start.js | tap-spec",
"posttest": "nyc report --reporter=lcov && snyk test",
"coverage": "npm test && cat ./coverage/lcov.info | coveralls"
"snyk": "snyk test",
"tape": "nyc tape test/start.js | tap-spec",
"report": "nyc report --reporter=lcov",
"pretest": "npm run lint && npm run snyk",
"test": "npm run tape",
"posttest": "npm run report",
"coveralls": "npm test && cat ./coverage/lcov.info | coveralls"
},
"dependencies": {
"bellajs": "^5.4.12",
"promise-wtf": "^0.1.25",
"bellajs": "^5.4.15",
"promise-wtf": "^1.1.0",
"request": "^2.75.0"

@@ -32,2 +35,3 @@ },

"eslint-config-ggc": "latest",
"nock": "latest",
"nyc": "latest",

@@ -34,0 +38,0 @@ "snyk": "latest",

@@ -70,1 +70,46 @@ /**

});
test('Call a unexist method', (assert) => {
paypal.request('CallUnexistMethod', {}).then((re) => {
assert.ok(bella.isObject(re), 'Result should be an object');
assert.equals(re.ACK, 'Failure', 'It must be an error');
}).catch((e) => {
console.log(e);
return false;
}).finally(assert.end);
});
test('Call with invalid params', (assert) => {
paypal.request('GetBalance', 'noop').then((re) => {
assert.ok(bella.isObject(re), 'Result should be an object');
assert.equals(re.ACK, 'Failure', 'It must be an error');
}).catch((e) => {
console.log(e);
return false;
}).finally(assert.end);
});
test('Call with instance initialized from the bad configs', (assert) => {
let fakePaypal = nvp({
rootDir: '../../../src/',
mode: 'sandbox',
track: 'https://www.sandbox.paypal.com',
username: 'facilitator_api1.itravellocal.com',
password: 'AYKNJZZE42ASU691',
signature: 'A0aEilikhBmwfK.NlduDjCbsdgRdT8VDPMDksDhGsHmLBECu80Qtru19'
});
fakePaypal.request('GetBalance', {}).then((re) => {
assert.ok(bella.isObject(re), 'Result should be an object');
assert.equals(re.ACK, 'Failure', 'It must be an error');
}).catch((e) => {
console.log(e);
return false;
}).finally(assert.end);
});
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