PHP application demonstrating PayPal Web Service calls, including Direct Payment and Express Checkout. The latest upgrades, FAQs and announcements can always be found at Developer Support for the SDK can also be found at

Please note the SDK is compatible with PHP versions 5.1.2 and higher.

You must also have the curl and openssl extensions enabled.


PayPal Integration Center
PayPal User Guides
API Documentation


Run the following PHP command from within your installation directory to install the samples

php install.php

At the prompt for your target web directory, enter the name of the directory where you wish to install the SDK samples (eg. /usr/local/apache/htdocs/php-sdk). If your application is on a shared server, enter the full path to a subdirectory of your public HTML directory into which the installer will copy the SDK sample files. The directory should not previously exist on your server.

If you see no error messages, the installation was successful. To verify installation, browse to the installation directory and you should see the paypal_php_samples directory

To run the samples:

Go to<targetDir>/paypal_php_samples/index.php


Providing Proxy Support

Right now, if the user is behind proxy,unable to make a API call to PayPal.

"SDKProxyProperties.php"(<installation directory>/php-sdk/lib/PayPal/) is the configuration file for Proxy setup.

Update the following variables in "SDKProxyProperties.php" for Proxy configuration.


Since PHP does not support "-" in variable names,sdk WSDL proxy generator will replace it by "_".
Before sending the xml request string, "_" has to be replaced by "-" back and this will be done by '/PayPal/SOAP/PatternReplace.php' which is called in '/PayPal/SOAP/client.php'. Uncomment the line in client.php if any wsdl tag element with "-" is in use(like "cpp_header_image")


Read the "LICENSE.txt" file for important legal information regarding the PayPal SDK.