PHPackages                             ladela/paypal-adaptivepayments-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. ladela/paypal-adaptivepayments-sdk-php

ActiveLibrary[Payment Processing](/categories/payments)

ladela/paypal-adaptivepayments-sdk-php
======================================

Paypal PHP Adaptive Payments SDK

v0.4.3(13y ago)312168SDK LicencePHPPHP &gt;=5.2.0

Since Jan 10Pushed 2y agoCompare

[ Source](https://github.com/rodgermd/adaptivepayments-sdk-php)[ Packagist](https://packagist.org/packages/ladela/paypal-adaptivepayments-sdk-php)[ Docs](https://github.com/paypal/adaptivepayments-sdk-php)[ RSS](/packages/ladela-paypal-adaptivepayments-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (9)Used By (0)

PayPal PHP Adaptive Payments SDK
================================

[](#paypal-php-adaptive-payments-sdk)

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

[](#prerequisites)

PayPal's PHP Adaptive Payments SDK requires

- PHP 5.2 and above with curl/openssl extensions enabled

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

[](#using-the-sdk)

To use the SDK,

- Copy the config and lib folders into your project. Modify the config file to suit your needs.
- Make sure that the lib folder in your project is available in PHP's include path
- Include the services\\AdaptivePayments\\AdaptivePaymentsService.php file in your code.
- Instantiate a service wrapper object
- Instantiate a request object as per your project's needs. All the API request and response classes are available in services\\AdaptivePayments\\AdaptivePaymentsService.php
- Invoke the appropriate method on the service object passing in the request object.

For example,

```
	require_once('services/AdaptivePayments/AdaptivePaymentsService.php');

    $payRequest = new PayRequest($requestEnvelope, $actionType, $cancelUrl,
                                  $currencyCode, $receiverList, $returnUrl);
    // Add optional params
    if($_POST["feesPayer"] != "") {
	   $payRequest->feesPayer = $_POST["feesPayer"];
    }
	......

	$service = new AdaptivePaymentsService();
	$response = $service->Pay($payRequest);
	$ack = strtoupper($response->responseEnvelope->ack);
	if($ack == 'SUCCESS') {
		// Success
	}
```

The SDK provides multiple ways to authenticate your API call.

```
	$service = new AdaptivePaymentsService();

	// Use the default account (the first account) configured in sdk_config.ini
	$response = $service->Pay($payRequest);

	// Use a specific account configured in sdk_config.inig
	$response = $service->Pay($payRequest, '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 = $service->Pay($payRequest, $cred);
```

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

[](#sdk-configuration)

Replace the API credential in config/sdk\_config.ini . You can use the configuration file to configure

- (Multiple) API account credentials.
- Service endpoint and other HTTP connection parameters
- Logging

Please refer to the sample config file provided with this bundle.

Using multiple SDKs together
----------------------------

[](#using-multiple-sdks-together)

\*copy the contents in 'lib/service/' to one of the SDKs \*add the service endpoint to 'config/sdk\_config.ini', for the endpoints refer the list below

Endpoint Configuration
----------------------

[](#endpoint-configuration)

\*The list below specifies endpoints for different services, in SANDBOX and PRODUCTION, with their property keys and end-point as property values.

\------------------------------SANDBOX------------------------------

- Merchant/Button Manager Service (3 Token)
    service.EndPoint.PayPalAPI=
    service.EndPoint.PayPalAPIAA=
- Merchant/Button Manager Service (Certificate)
    service.EndPoint.PayPalAPI=
    service.EndPoint.PayPalAPIAA=
- AdaptiveAccounts Platform Service
    service.EndPoint.AdaptiveAccounts=
- AdaptivePayments Platform Service
    service.EndPoint.AdaptivePayments=
- Invoice Platform Service
    service.EndPoint.Invoice=
- Permissions Platform Service
    service.EndPoint.Permissions=

\------------------------------PRODUCTION------------------------------

- Merchant/Button Manager Service (3 Token)
    service.EndPoint.PayPalAPI=
    service.EndPoint.PayPalAPIAA=
- Merchant/Button Manager Service (Certificate)
    service.EndPoint.PayPalAPI=
    service.EndPoint.PayPalAPIAA=
- AdaptiveAccounts Platform Service
    service.EndPoint.AdaptiveAccounts=
- AdaptivePayments Platform Service
    service.EndPoint.AdaptivePayments=
- Invoice Platform Service
    service.EndPoint.Invoice=
- Permissions Platform Service
    service.EndPoint.Permissions=

For additional information please refer to

Instant Payment Notification (IPN)
----------------------------------

[](#instant-payment-notification-ipn)

refer to the IPN-README in 'samples/IPN' directory

Getting help
------------

[](#getting-help)

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

```
 OR

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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 ~1 days

Total

6

Last Release

4872d ago

### Community

Maintainers

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

---

Top Contributors

[![aydiv](https://avatars.githubusercontent.com/u/531806?v=4)](https://github.com/aydiv "aydiv (21 commits)")[![ganeshx](https://avatars.githubusercontent.com/u/644158?v=4)](https://github.com/ganeshx "ganeshx (19 commits)")[![tkanta](https://avatars.githubusercontent.com/u/654936?v=4)](https://github.com/tkanta "tkanta (12 commits)")[![kumaravel-jayakumar](https://avatars.githubusercontent.com/u/1195567?v=4)](https://github.com/kumaravel-jayakumar "kumaravel-jayakumar (2 commits)")[![lathavairamani](https://avatars.githubusercontent.com/u/644422?v=4)](https://github.com/lathavairamani "lathavairamani (2 commits)")[![samcleaver](https://avatars.githubusercontent.com/u/284957?v=4)](https://github.com/samcleaver "samcleaver (2 commits)")[![johnj](https://avatars.githubusercontent.com/u/42193?v=4)](https://github.com/johnj "johnj (1 commits)")[![prannamalai](https://avatars.githubusercontent.com/u/1575082?v=4)](https://github.com/prannamalai "prannamalai (1 commits)")[![hkdobrev](https://avatars.githubusercontent.com/u/506129?v=4)](https://github.com/hkdobrev "hkdobrev (1 commits)")

---

Tags

sdkpaypaladaptive payments

### Embed Badge

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

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

PHPackages © 2026

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