PHPackages                             paypal/permissions-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. paypal/permissions-sdk-php

Abandoned → [paypal/paypal-server-sdk](/?search=paypal%2Fpaypal-server-sdk)ArchivedLibrary[Payment Processing](/categories/payments)

paypal/permissions-sdk-php
==========================

PayPal permission SDK for PHP

v3.9.1(10y ago)15962.8k↓11.7%27[1 issues](https://github.com/paypal/permissions-sdk-php/issues)Apache2PHPPHP &gt;=5.3.0

Since Feb 6Pushed 1y ago4 watchersCompare

[ Source](https://github.com/paypal/permissions-sdk-php)[ Packagist](https://packagist.org/packages/paypal/permissions-sdk-php)[ Docs](https://developer.paypal.com)[ RSS](/packages/paypal-permissions-sdk-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (17)Used By (0)Security (1)

Deprecation Notice:
===================

[](#deprecation-notice)

This SDK is deprecated; you can continue to use it, but no new features or support requests will be accepted. An integration with [the new Server SDK](https://github.com/paypal/PayPal-Server-SDKs) is recommended. Review the [docs](https://developer.paypal.com/serversdk/http/getting-started/how-to-get-started/) for details.

PayPal PHP Permissions SDK
==========================

[](#paypal-php-permissions-sdk)

TLSv1.2 Update
--------------

[](#tlsv12-update)

> **The Payment Card Industry (PCI) Council has [mandated](http://blog.pcisecuritystandards.org/migrating-from-ssl-and-early-tls) that early versions of TLS be retired from service. All organizations that handle credit card information are required to comply with this standard. As part of this obligation, PayPal is updating its services to require TLS 1.2 for all HTTPS connections. At this time, PayPal will also require HTTP/1.1 for all connections. [Click here](https://github.com/paypal/tls-update) for more information**

> A new `mode` has been created to test if your server/machine handles TLSv1.2 connections. Please use `tls` mode instead of `sandbox` to verify. You can return back to `sandbox` mode once you have verified. Please have a look at this [Sample Configuration](https://github.com/paypal/permissions-sdk-php/blob/namespace-php5.3/samples/Configuration.php#L10-15).

POODLE Update
-------------

[](#poodle-update)

- Because of the Poodle vulnerability, PayPal has disabled SSLv3.
- To enable TLS encryption, the changes were made to [PPHttpConfig.php](https://github.com/paypal/sdk-core-php/blob/namespace-5.3/lib/PayPal/Core/PPHttpConfig.php#L11) in [SDK Core](https://github.com/paypal/sdk-core-php/tree/namespace-5.3) to use a cipher list specific to TLS encryption.

```
    /**
	 * Some default options for curl
	 * These are typically overridden by PPConnectionManager
	 */
	public static $DEFAULT_CURL_OPTS = array(
		CURLOPT_SSLVERSION => 1,
		CURLOPT_CONNECTTIMEOUT => 10,
		CURLOPT_RETURNTRANSFER => TRUE,
		CURLOPT_TIMEOUT        => 60,	// maximum number of seconds to allow cURL functions to execute
		CURLOPT_USERAGENT      => 'PayPal-PHP-SDK',
		CURLOPT_HTTPHEADER     => array(),
		CURLOPT_SSL_VERIFYHOST => 2,
		CURLOPT_SSL_VERIFYPEER => 1,
		CURLOPT_SSL_CIPHER_LIST => 'TLSv1',
	);
```

- There are two primary changes done to curl options:
    - CURLOPT\_SSLVERSION is set to 1 . See [here](http://curl.haxx.se/libcurl/c/CURLOPT_SSLVERSION.html) for more information
    - CURLOPT\_SSL\_CIPHER\_LIST was set to TLSv1, See [here](http://curl.haxx.se/libcurl/c/CURLOPT_SSL_CIPHER_LIST.html) for more information

All these changes are included in the recent release, along with many other bug fixes. We highly encourage you to update your versions, by either using `composer` or running this command shown below:

```
curl -k -L https://raw.githubusercontent.com/paypal/permissions-sdk-php/stable-php5.3/samples/install.php | php
        OR
wget  https://raw.githubusercontent.com/paypal/permissions-sdk-php/stable-php5.3/samples/install.php
php install.php

```

Support
-------

[](#support)

> Please contact [PayPal Technical Support](https://developer.paypal.com/support/) for any live or account issues.

Prerequisites
-------------

[](#prerequisites)

PayPal's PHP Permissions SDK requires

- PHP 5.3 and above
- curl/openssl PHP extensions

Running the sample
------------------

[](#running-the-sample)

To run the bundled sample, first copy the samples folder to your web server root. You will then need to install the SDK as a dependency using either composer (PHP V5.3+ only).

run `composer update` from the samples folder.

Using the SDK
-------------

[](#using-the-sdk)

To use the SDK,

- Create a composer.json file with the following contents.

```
{
    "name": "me/shopping-cart-app",
    "require": {
        "paypal/permissions-sdk-php":"v3.*"
    }
}
```

- Install the SDK as a dependency using composer or the install.php script.
- Require `vendor/autoload.php` OR `PPBootStrap.php` in your application depending on whether you used composer or the custom installer.
- Choose how you would like to configure the SDK - You can either
    - Create a hashmap containing configuration parameters and pass it to the service object OR
    - Create a `sdk_config.ini` file and set the PP\_CONFIG\_PATH constant to point to the directory where this file exists.
- Instantiate a service wrapper object and a request object as per your project's needs.
- Invoke the appropriate method on the service object.

For example,

```
	// Sets config file path(if config file is used) and registers the classloader
    require("PPBootStrap.php");

	// Array containing credentials and confiuration parameters. (not required if config file is used)
	$config = array(
       'mode' => 'sandbox',
       'acct1.UserName' => 'jb-us-seller_api1.paypal.com',
       'acct1.Password' => 'WX4WTU3S8MY44S7F'
       .....
    );

    $request = new RequestPermissionsRequest($scope, $returnURL);
	$request->requestEnvelope = $requestEnvelope;
	.......

	$permissions = new PermissionsService($config);
	$response = $permissions->RequestPermissions($request);

	if($strtoupper($response->responseEnvelope->ack) == 'SUCCESS') {
		// Success
	}
```

Authentication
--------------

[](#authentication)

The SDK provides multiple ways to authenticate your API call.

```
	$permissions = new PermissionsService($config);

	// Use the default account (the first account) configured in sdk_config.ini
	$response = $permissions->RequestPermissions($request);

	// Use a specific account configured in sdk_config.ini
	$response = $permissions->RequestPermissions($request, 'jb-us-seller_api1.paypal.com');

	// Pass in a dynamically created API credential object
    $cred = new PPCertificateCredential("username", "password", "path-to-pem-file");
    $cred->setThirdPartyAuthorization(new PPTokenAuthorization("accessToken", "tokenSecret"));
	$response = $permissions->RequestPermissions($request, $cred);
```

SDK Configuration
-----------------

[](#sdk-configuration)

The SDK allows you to configure the following parameters -

- Integration mode (sandbox / live)
- (Multiple) API account credentials.
- HTTP connection parameters
- Logging

Dynamic configuration values can be set by passing a map of credential and config values (if config map is passed the config file is ignored)

```
    $config = array(
       'mode' => 'sandbox',
       'acct1.UserName' => 'jb-us-seller_api1.paypal.com',
       'acct1.Password' => 'WX4WTU3S8MY44S7F'
       .....
    );
	$service  = new PermissionsService($config);
```

Alternatively, you can configure the SDK via the sdk\_config.ini file.

```
    define('PP_CONFIG_PATH', '/directory/that/contains/sdk_config.ini');
    $service  = new InvoiceService();
```

You can refer full list of configuration parameters in [wiki](https://github.com/paypal/sdk-core-php/wiki/Configuring-the-SDK) page.

Links
-----

[](#links)

- API Reference -
- If you need help using the SDK, a new feature that you need or have a issue to report, please visit

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Recently: every ~98 days

Total

16

Last Release

3858d ago

Major Versions

v2.3.101 → v3.4.1022013-06-06

v2.4.103 → v3.5.1032013-06-11

v2.5.106 → v3.6.1062013-08-22

v2.6.107 → v3.8.1072014-11-11

PHP version history (2 changes)v2.2.98PHP &gt;=5.2.0

v3.4.102PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/dcc8e719eed09b6c6b9c4763a8410175af723aa2049a3e65d8015e200649b571?d=identicon)[paypal](/maintainers/paypal)

---

Top Contributors

[![ganeshx](https://avatars.githubusercontent.com/u/644158?v=4)](https://github.com/ganeshx "ganeshx (48 commits)")[![lvairamani](https://avatars.githubusercontent.com/u/1984252?v=4)](https://github.com/lvairamani "lvairamani (20 commits)")[![aydiv](https://avatars.githubusercontent.com/u/531806?v=4)](https://github.com/aydiv "aydiv (20 commits)")[![tkanta](https://avatars.githubusercontent.com/u/654936?v=4)](https://github.com/tkanta "tkanta (14 commits)")[![lathavairamani](https://avatars.githubusercontent.com/u/644422?v=4)](https://github.com/lathavairamani "lathavairamani (9 commits)")[![siddick](https://avatars.githubusercontent.com/u/159859?v=4)](https://github.com/siddick "siddick (3 commits)")[![kumaravel-jayakumar](https://avatars.githubusercontent.com/u/1195567?v=4)](https://github.com/kumaravel-jayakumar "kumaravel-jayakumar (2 commits)")[![jaypatel512](https://avatars.githubusercontent.com/u/1309895?v=4)](https://github.com/jaypatel512 "jaypatel512 (2 commits)")[![avidas](https://avatars.githubusercontent.com/u/873597?v=4)](https://github.com/avidas "avidas (2 commits)")[![johnj](https://avatars.githubusercontent.com/u/42193?v=4)](https://github.com/johnj "johnj (1 commits)")[![ppalavilli](https://avatars.githubusercontent.com/u/354338?v=4)](https://github.com/ppalavilli "ppalavilli (1 commits)")[![prannamalai](https://avatars.githubusercontent.com/u/1575082?v=4)](https://github.com/prannamalai "prannamalai (1 commits)")[![Dani-Kirby](https://avatars.githubusercontent.com/u/58542682?v=4)](https://github.com/Dani-Kirby "Dani-Kirby (1 commits)")[![braebot](https://avatars.githubusercontent.com/u/3358986?v=4)](https://github.com/braebot "braebot (1 commits)")

---

Tags

phpsdkpaypal

### Embed Badge

![Health badge](/badges/paypal-permissions-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/paypal-permissions-sdk-php/health.svg)](https://phpackages.com/packages/paypal-permissions-sdk-php)
```

###  Alternatives

[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2714.4k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
