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

hapi-paypal

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-paypal - npm Package Compare versions

Comparing version 0.0.29 to 0.0.30

1

lib/index.d.ts

@@ -32,2 +32,3 @@ import * as hapi from "hapi";

register: hapi.PluginFunction<any>;
private defaultResponseHandler(ohandler, request, reply, error, response);
private buildRoutes(routes);

@@ -34,0 +35,0 @@ private enableWebhooks(webhook);

58

lib/index.js

@@ -66,8 +66,3 @@ "use strict";

paypal.payment.create(request.payload, (error, response) => {
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});

@@ -88,8 +83,3 @@ return;

}
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});

@@ -106,10 +96,4 @@ },

paypal.invoice.search(request.payload, (error, response) => {
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});
return;
},

@@ -125,10 +109,4 @@ method: "POST",

paypal.invoice.create(request.payload, (error, response) => {
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});
return;
},

@@ -144,8 +122,3 @@ method: "POST",

paypal.invoice.send(request.params.invoiceid, request.payload, (error, response) => {
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});

@@ -163,8 +136,3 @@ return;

paypal.invoice.get(request.params.invoiceid, (error, response) => {
if (ohandler) {
ohandler.apply(this, [request, reply, error, response]);
}
else {
return error ? reply(boom.badRequest(error.response.message)) : reply(response);
}
this.defaultResponseHandler(ohandler, request, reply, error, response);
});

@@ -177,2 +145,16 @@ return;

}
defaultResponseHandler(ohandler, request, reply, error, response) {
if (ohandler) {
ohandler(request, reply, error, response);
}
else {
if (error) {
const bError = boom.badRequest(error.response.message);
bError.output.payload.details = error.response.details;
bError.reformat();
return reply(bError);
}
return reply(response);
}
}
buildRoutes(routes) {

@@ -179,0 +161,0 @@ routes.forEach((route) => {

{
"name": "hapi-paypal",
"version": "0.0.29",
"version": "0.0.30",
"description": "A hapi plugin to interface with PayPal Rest API's and webhooks.",

@@ -5,0 +5,0 @@ "license": "MIT",

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