Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
like-paypal
Advanced tools
Simple PayPal API for Node.js
npm i like-paypal
const PayPal = require('like-paypal')
const account = new PayPal({
clientId: 'AXH41VU0Lji...',
secretKey: 'ECJeQAFuLn...',
})
main()
async function main () {
const product = await account.products.create({
name: 'Video Streaming Service',
description: 'A video streaming service',
type: 'SERVICE',
category: 'SOFTWARE',
image_url: 'https://example.com/streaming.jpg',
home_url: 'https://example.com/home'
})
console.log(product)
}
const account = new PayPal([options])
Creates an instance of a PayPal account.
Available options
:
{
clientId: null, // To auto create an access token
clientKey: null,
accessToken: null // Or pass a token directly to avoid creating one
}
const accessToken = await account.auth()
Generates an access token.
const response = await account.api(pathname, [options])
Request to any endpoint easily.
pathname
can be i.e. /v1/catalogs/products
, etc.
Available options
:
{
auth: null, // Default is `Bearer {accessToken}`
method: 'POST',
body: undefined, // Normally an object { ... }
requestType: 'json',
responseType: 'json'
}
const product = await account.products.create([options])
Creates a product.
Available options
:
{
name: 'Any name',
description: 'Some description',
type: 'SERVICE', // TODO: what are other types?
category: 'SOFTWARE', // TODO: what are other categories?
image_url: 'https://example.com/streaming.jpg',
home_url: 'https://example.com/home'
} // TODO: what are other options? Want to know the full options
const plan = await account.plans.create(options)
Creates a billing plan.
Available options
are in docs and schema.
const subscription = await account.subscriptions.create(options)
Creates a subscription for a billing plan.
Available options
are in docs and schema.
Unlicensed
FAQs
Simple PayPal API for Node.js
The npm package like-paypal receives a total of 2 weekly downloads. As such, like-paypal popularity was classified as not popular.
We found that like-paypal demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.