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

paypal-isomorphic-functions

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paypal-isomorphic-functions - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

1

dist/orders/index.d.ts

@@ -6,1 +6,2 @@ import { IPayPalAccessToken } from "../oauth/interfaces";

export declare function authorize(token: IPayPalAccessToken, id: string, data?: any, headers?: any): Promise<Response>;
export declare function capture(token: IPayPalAccessToken, id: string, data?: any, headers?: any): Promise<Response>;

@@ -51,4 +51,6 @@ "use strict";

Authorization: `Bearer ${token.access_token}`,
"Content-Type": "application/json"
}
"Content-Type": "application/json",
...headers
},
body: JSON.stringify(payload)
};

@@ -58,2 +60,16 @@ return await fetch(`${config_1.CONFIG.get("PAYPAL_REST_HOSTNAME")}/v2/checkout/orders/${id}/authorize`, options);

exports.authorize = authorize;
async function capture(token, id, data, headers) {
const payload = data;
const options = {
method: "POST",
headers: {
Authorization: `Bearer ${token.access_token}`,
"Content-Type": "application/json",
...headers
},
body: JSON.stringify(payload)
};
return await fetch(`${config_1.CONFIG.get("PAYPAL_REST_HOSTNAME")}/v2/checkout/orders/${id}/capture`, options);
}
exports.capture = capture;
//# sourceMappingURL=index.js.map

2

package.json
{
"name": "paypal-isomorphic-functions",
"version": "1.0.10",
"version": "1.0.11",
"description": "Library of helpful paypal functions that can be run in a browser or server",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -85,5 +85,6 @@ import { IPayPalAccessToken } from "../oauth/interfaces";

Authorization: `Bearer ${token.access_token}`,
"Content-Type": "application/json"
}
// body: JSON.stringify(payload)
"Content-Type": "application/json",
...headers
},
body: JSON.stringify(payload)
};

@@ -95,1 +96,25 @@ return await fetch(

}
export async function capture(
token: IPayPalAccessToken,
id: string,
data?: any,
headers?: any
) {
// TODO: add a default
const payload = data;
const options = {
method: "POST",
headers: {
Authorization: `Bearer ${token.access_token}`,
"Content-Type": "application/json",
...headers
},
body: JSON.stringify(payload)
};
return await fetch(
`${CONFIG.get("PAYPAL_REST_HOSTNAME")}/v2/checkout/orders/${id}/capture`,
options
);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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