PayPal PHP SDK Video Demo
PayPal REST API SDK
The PayPal REST API includes all of the latest and greatest web services provided by PayPal. The REST APIs have tied into our library so that they are quick and easy to integrate into any PHP application.
The libraries support all of the REST services that PayPal provides.
PayPal Classic API SDK
The Classic API is PayPal’s original platform which consists of a variety of NVP or SOAP web services.
This PayPal PHP SDK fully supports all of the PayPal Classic API calls that are available.
The underlying class library that drives this PayPal PHP SDK is entirely object-oriented and fully extendable for advanced developers. However, you do not need to understand how to work with objects and program in that manner in order to use this SDK.
The library comes complete with fully functional samples for the majority of the PayPal API calls that are available.
It also has empty template files for every call ready to go. All you have to do is open the template file with the name of the API you would like to call, and fill out the PHP array parameter values that are prepared for you with your application’s data. The library will handle the rest.
The results of the library are provided in an easy to read PHP array that includes all of the data you might need:
- Original request data sent to PayPal
- Individual response fields returned from PayPal
- A copy of the raw request and response data for troubleshooting purposes.
You can have any PayPal API call you need running within minutes!
PayPal GetBalance Usage Sample
// Include required library files. require_once('../includes/config.php'); require_once('../autoload.php'); // Create PayPal object. $PayPalConfig = array( 'Sandbox' => $sandbox, 'APIUsername' => $api_username, 'APIPassword' => $api_password, 'APISignature' => $api_signature, 'PrintHeaders' => $print_headers, 'LogResults' => $log_results, 'LogPath' => $log_path, ); $PayPal = new angelleye\PayPal\PayPal($PayPalConfig); // Prepare request arrays $GBFields = array('returnallcurrencies' => ''); $PayPalRequestData = array('GBFields'=>$GBFields); // Pass data into class and load the response into $PayPalResult $PayPalResult = $PayPal->GetBalance($PayPalRequestData); // Write the contents of the response array to the screen for demo purposes. echo ' <pre />'; print_r($PayPalResult);
Check Out Our Demo Kits
The library does include functional samples of many of the supported API calls, but they are just the individual calls themselves.
Our demo kits provide a complete shopping cart checkout experience fully integrated with our PayPal PHP SDK. They also include videos that walk you through the whole process.
This will get you familiar with the general PayPal class usage very quickly. It will also give you good experience with PayPal Checkout, Billing Plans and Agreements, PayPal Payments Pro, Adaptive Payments, and more as we make more demo kits available.
Chung Yong, Eom –
I am sure that this paypal library is helpful to everyone using paypal.
The paypal library is good library.
Hi! Im using the library, and it’s great! Easy to implement (with Composer) and use, but if anyone can help me with an error I’m getting, that would be great. In Adaptive Payments there is one variable that I can’t find in the REST section of PayPal site, the APPLICATION ID of my application. Anyone knows where is it? Thanks!
 => Array
[Category] => Application
[Domain] => PLATFORM
[ErrorID] => 560029
[Message] => The required X-PAYPAL-APPLICATION-ID header is missing from the HTTP request
[Parameter] => X-PAYPAL-APPLICATION-ID
[Severity] => Error
[Subdomain] => Application
Andrew Angell (store manager) –
Adaptive Payments is no longer available for new applications. The Application ID would be provided after you apply and get approved for your app. They are not approving any new apps, though. As such, you’re going to need to use a different API. What is your goal with Adaptive?
I’m Laravel developer and this lib help me a lot. Can I use your lib to build a Laravel package?
Andrew Angell (store manager) –
Yes, of course! The library works well in Laravel in general via Composer, but if you want to build Laravel specific packages with it that would be great!
A great library! Helped me out a lot as I am still a beginner and Andrew K. Angell was great with helping me out. Plenty of documentation, once you get the hang of all the variables it really does make it simple. There are samples and templates for everything! Just makes life a lot easier.
The best PHP library for PayPal out there. So easy, even for beginners!
Thank you for providing your php class for PayPal! I have used your class in countless projects and I’m glad to see you are keeping it up to date. I can’t wait to see it packaged for composer.
Paul Le –
I’m a wordpress developer and this library help me a lot in building plugins without worry about the paypal payment api. Really great. Thanks.
Tom Jenson –
I was processing credit cards on my site in a matter of minutes with this thing. Great work! Thanks a bunch!