Socket
Socket
Sign inDemoInstall

paypal-permissions-sdk

Package Overview
Dependencies
7
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    paypal-permissions-sdk

The PayPal Permission SDK provides javascript APIs for developers to request and obtain permissions from merchants and consumers, to execute APIs on behalf of them. The permissions include variety of operations from processing payments to accessing accoun


Version published
Weekly downloads
32
decreased by-23.81%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Permissions SDK

The PayPal Permission SDK provides javascript APIs for developers to request and obtain permissions from merchants and consumers, to execute APIs on behalf of them. The permissions include variety of operations from processing payments to accessing account transaction history.

Installation

$ npm install paypal-sdk-permissions

Example

Request permission:

let PermissionsApi = require('paypal-sdk-permissions')
let api = new PermissionsApi({
  mode: 'sandbox', // set "live" for production
  userId: 'xxx',
  password: 'xxx',
  signature: 'xxx',
  appId: 'APP-80W284485P519543T'
})

let scope = ['ACCESS_BASIC_PERSONAL_DATA', 'ACCESS_ADVANCED_PERSONAL_DATA', 'DIRECT_PAYMENT', 'REFUND', 'AUTH_CAPTURE']
let returnUrl = 'http://localhost:8082/oauth/token'
api.requestPermissions(scope, returnUrl, function(error, response){
  if (!error) {
    console.log(api.getGrantPermissionUrl(response.token))  // redirect url to grant permissions
  }
})

Make API call with token and token_secret:

api.setAuth('token', 'token_secret')
let response = api.GetBasicPersonalData(['full_name'], function(error, response){
  console.log(response)
})

FAQs

Last updated on 15 Jul 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc