README

Adaptive Payments moving to limited release

Important: Adaptive Payments is now a limited release product. It is restricted to select partners for approved use cases and should not be used for new integrations without guidance from PayPal.

TLSv1.2 Update

The Payment Card Industry (PCI) Council has mandated 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 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.

Prerequisites

PayPal's PHP Adaptive Payments SDK requires

PHP 5.3 and above

curl/openssl PHP extensions

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).

Authentication

The SDK provides multiple ways to authenticate your API call.

$service=newAdaptivePaymentsService($config);// Use the default account (the first account) configured in sdk_config.ini or config hashmap$response=$service->Pay($payRequest); // Use a specific account configured in sdk_config.ini or config hashmap$response=$service->Pay($payRequest, 'jb-us-seller_api1.paypal.com'); // Pass in a dynamically created API credential object$cred=newPPCertificateCredential("username", "password", "path-to-pem-file");$cred->setThirdPartyAuthorization(newPPTokenAuthorization("accessToken", "tokenSecret"));$response=$service->Pay($payRequest, $cred);

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)