Angell EYE Officially Releases PayPal Payments Pro PHP Class
Angell EYE has been developing applications that integrate PayPal for more than 6 years. PayPal provides SDK’s, however, they weren’t quite what I considered complete. As such, I developed this class library to suit my needs and have made it available to developers to use as well with some great feedback.
PayPal recognized the value of this class library by publishing an article I wrote about it in their DevZone at X.com. This immediately increased the number of developers using the library and I’ve received even more positive feedback since then.
Download it here and have a look. There are samples provided in the download, and I will be creating some demo videos before long to provide more details on exactly how to use this library.










Thanks for sharing. And you’ve done a very nice job on documenting the details!
Question: I’m new to the WPP API. Is your class setup to manage WPP Recurring?
I’m referring to the newer, recurring payment module:
https://www.paypal.com/us/cgi-bin/?&cmd=xpt/Marketing/general/ProRecurringPayments-outside
Yes, the class handles Recurring Payments with ease! Just look at the CreateRecurringPaymentsProfile function built in.
Thanks for investing your time into this incredible PHP class. Have you made any headway into documentation for the class?
Hey, no problem. I’m glad you like it. I’ve actually been converting the classes to CodeIgniter libraries and while doing that I’m making updates and providing better samples of everything. They’re almost done. I’ll be sure and update here soon!
A CodeIgniter Library sounds great! When are they likely to be ready?
The Payments Pro version is ready! I’m about to post a new article covering it directly. Stay tuned!
Hi.
Just hit your web via google. Does the class supports Paypal embedded payments? also any news on docs?
Thanks
I still need to get Embedded Payments added but it should be real simple from what I’ve seen int he documentation. I’ve just recently gotten this class converted into a CodeIgniter library and I’ve been working on the documentation. Stay tuned!
Great job on this.
Curious, what kind of licensing are you going to use? I would like to use this in a wordpress plugin.
Thanks!
Hi. I haven’t officially tagged it with licensing yet but you’re free to use it. Just give me credit.
Awesome code you’ve done there! I wonder if this is available at github, ‘coz I’d like to fork this for my cakephp projects. thanks!
Unfortunately, I haven’t gotten this on github, but I do plan on it here soon. I’m going to be updating the library before long to add some new things PayPal has done recently and then I’ll probably get that done. I’m glad you like the code!
Hi,
How is the work progressing on embedded payments. I’d rather you put code CodeIgniter on hold and get this update out ASASP.
Thanks!
Hi Paul,
Embedded Payments is really nothing more than wrapping a small javascript around the traditional calls and changing your endpoint URL. I don’t have it technically built into the library yet but it’s very easy to implement. Contact me directly and I can get you some samples.
Any chance of making those samples public? Great work by the way..
I have been having issues with people being charged multiple times. Sometimes it is right after they just purchased and other times it is the next time they come to our site, they get another transaction. This happened quite a few times so it wasn’t just one isolated incident. Have you heard of anything like this before? I talked to PayPal and they said that was a new one for them. We also have it set so that order duplication would not occur, but apparently that is not working correctly.. either Im calling it wrong using your class, or PayPal is ignoring it.. Im not sure what’s going on. Anything you can think of would be awesome
Thanks for an awesome PayPal class, it really made a lot of my work easy
Hi Rick. Sorry for the delay getting back with you. That is an odd scenario you’re describing and I’m afraid I haven’t heard of anything like that off the top of my head. I’d have to get a look at your stuff to try and help troubleshoot it. I’m happy to do so if you’re still having issues.
hi,
with which paypal account it works ?
Standard or Pro ?
Any way its a great job you did.
thanks
The class supports all of PayPal’s advanced API’s. So it’s a lot more than just Pro, but I wouldn’t classify it as standard except for the fact that you don’t need Pro for the majority of the API calls.
Hello Angell.
I’m building a site that requires adtaptive (chained) payments. I noticed you mentioned a class in an article at xcommerce.com but don’t see to find it here or am i wrong .
Its kind of you to offer this work to developers.
I am quite a novice and have just got a basic system working at the moment.
cheers Paddy
When updating my site to your new set of includes I get a 10540 error on all transactions… I also noticed an error I think in the dodirectpayment PayerName is the array you include at the bottom but the array is actually PayerInfo. Please let me know if you have any ideas on the 10540 I have reverted back to your old build. THank you very much for such a great package makes paypal and php so easy!
Hi Ryan,
Not sure why you’d be getting an invalid address. Do you have a test server you can set it up on so I could take a look? Or just send me the files you’re working with and I’ll see why that would have happened.
You’re right about PayerName/PayerInfo. I just noticed that the other day. Either one actually works with the class, you just have to match it up in your request page. I had both on accident in my template file. I’ve got that fixed already and will be releasing 1.2 before long.
I’m curious myself what would have caused that problem, though. How long ago did you download my original library?
hi i want to use paypal recurring payment you said it works for recurring too can you please write article how to integrate your class ? how to get necessary things like DeveloperEmailAccount,ApplicationID,DeviceID ? sorry i’m really new to paypal integration…and how to make recurring payment works..
I’ve got a basic overview video that shows you how to use the library. If you need more help than that you can contact me directly and I’d be happy to setup a quick training session with you.
Hi angelleye,
Thanks for sharing it. Your php class is amazing. Can i do parallel with it? If yes please give me example codes with explaination. It will be appreciate it. thanks
Hi, thanks! I’m glad you like the class. It can indeed handle Parallel payments with ease. If you want to contact me directly I’d be happy to do a screen share with you and show you how to make it happen.
I need the same example please…
I plan to get a tutorial for that posted soon, and probably a video along with it. Stay tuned for that. In the mean-time you could schedule a 1 on 1 training session with me if you like.
Angellleye.. WOW!!! I just want to a very big thank you for al you hard work on this PayPal PRo API.. Thanks for taking you valuable time to do this. It has save me countless hours of coding..
Glad to hear it! Let me know if you have any questions or concerns while using it.
Hi Andrew,
I need your support for the integration of the paypal adaptive class in drupal CMS. For this I’m working on custom module.
Everything is working fine but I facing one problem:
During notification URL I must need to save the payer information into database and send an email to payer with product information and for this I need to do some coding stuff.
But during notification URL or return URL I unable to find any returning parameter from paypal side in $_REQUEST method and it is empty.
I really need this returning parameters to update the database with payer information
I’m using class from this tutorials:
https://www.x.com/devzone/articles/using-adaptive-payments-build-real-time-affiliate-payment-system
I have set up the code for return URL and notification URL on these pages but not getting any thing:
‘ReturnURL’ => $base_url.’/buy-hd-template-notification’
‘IPNNotificationURL’ => $base_url.’/buy-hd-template-notification’,
Please let me know how I get all payment related information in case of notification URL with this class.
I would like to share you the custom module of drupal after successful integration…:)
Please let me know ASAP
Thanks in advance!
Vikas
Dear Andrew,
When I test your codes on other OS, It works successfully! However it does not work on MAC Book. Do you ever see that kind of error
I get that error when run your sample DoDirectPayment.php
Look forwards to hearing your help!
Thanks and regards,
Dinh Chau
Hi Dinh,
That sounds it’s probably something to do with the web server and PHP you have running on the Macbook. You’ll need to make sure it’s PHP5 and that CURL is enabled. I can’t offer much else in the way of a fix without an actual error code or message or more details about exactly what’s happening..??
Andrew
Angel, is there a way to send custom variable with adaptive payments?
i need to send the invoice id
Hi Edgar,
The Pay API includes a TRACKINGID parameter that can be used for your invoice ID.
I need your help to integrate Chained paypal payment system in my website,please help
Thanks
Vikas
Hi Vikas,
Is there something in particular you’re getting stuck with?
I am not sure ,how to implement checkout codes to connect with chained paypal system,if you have script then please help us.
Hi Vikas,
Yes, the library I provide on my site will help you do that very easily. If you need more help than that I can offer 1 on 1 training. Contact me directly for more information on that.
Hello,
We want to transaction on our website ,Paypal process is running in background in “Paypal adaptive chained payment system”.
Is there any method in Paypal adaptive chained payment system to do this.
Thanks
Which method is used for do payment without leaving my website and without going to Paypal site.
Thanks
Nice Work…
can you help me…? that i don’t know about holdon condition of paypal payment like canel and suspend.. please tell me about this.
I’d be happy to help, but I’m not sure I understand your question..??
I am unable to getting value after transition in chained payment method,i am getting blank array in POST
Thanks
Sahil Kumar
Hi Sahil,
If you want to send me your file you’re working with I’ll take a look and see if I can find the problem.
Hi,i integrate Paypal chained method,but i have confusion that
1 . return URL,ipn notification url same or not
2 . i have got nothing on my ipn return url
Please help
Thanks
Is Paypal Payments Pro compatible with Paypal’s Adaptive Payments API(Chained payment system)?
Those are two separate features. Payments Pro will allow you to process credit cards directly without any redirection to PayPal. Adaptive Payments will not do that. Users can pay with a credit card using “Guest Checkout” but that would happen on the PayPal pages.
Hello,
Thanks for help.
How to integrate ‘Payments Pro’?
Can i have ‘Payments Pro’ code and documentation
please help,
I don’t have any specific documentation for that right now, but I do plan on posting some before long. Stay tuned, or if you’d like you could always schedule a 1 on 1 training session with me.
HI,
Great work, thank you.
Forgive me, my php is pretty bad. I have the array retrieving paypal and printing on screen all working fine using “print_r($PayPalResult);”
How do I print just the actual balance amount without all the other data?
eg. 25.00 instead of the whole array [L_AMT0] => 25.00….. etc.
Thanks.
Array values can be retrieved using $ArrayName['FieldName']. So in this case you would use something like…
$Amount = $PayPalResult['L_AMT0'];
Thanks Andrew.
Hey, Andrew,
I was able to send the invoice, but when I click on the url (https://www.sandbox.paypal.com/ca/cgi-bin/?cmd=3D_pay-inv&id=3DINV2-56XX-LC=
AB-SJUF-SN4L) it tells me You have requested an outdated version of PayPal. This error often results from the use of bookmarks.
Thanks for your help.
Looks like I figured out the issue. 3D should not be in url after the equal sign.
Thanks.
Glad you got it figured out, but I can’t tell if you’re saying there was an issue with my library or if it was something on your end..??
Hi there is any error in the GetAccessPermissionDetails method it return
Array
(
[ACK] => Failure
[L_ERRORCODE0] => 81002
[L_SHORTMESSAGE0] => Unspecified Method
[L_LONGMESSAGE0] => Method Specified is not Supported
[L_SEVERITYCODE0] => Error
[ERRORS] => Array
(
[0] => Array
(
[L_ERRORCODE] => 81002
[L_SHORTMESSAGE] => Unspecified Method
[L_LONGMESSAGE] => Method Specified is not Supported
[L_SEVERITYCODE] => Error
)
)
[Permissions] => Array
(
)
[REQUESTDATA] => Array
(
[USER] =>XXXXXX
[PWD] => XXXXXX
[VERSION] => 85.0
[BUTTONSOURCE] => AngellEYE_PHPClass
[SIGNATURE] => XXXXXXX
[METHOD] => GetAccessPermissionsDetails
[TOKEN] => XXXXX
)
where XXXX are my credentials..
What is the problem…..?
Hi Musarrat,
I responded to your ticket on Binpress. I think you’re just missing the s on GetAccessPermissionsDetails.
Hi Andrew,
Many Thanks for your Great work.
I have used your library for Paypal Pro Recurring Payment. For that I have used CreateRecurringPaymentsProfile.php file for reference.
Can you please help me .. I want to know how can I capture payment notification .. or which reference file is used for that in your library.
Thanks
You can use Instant Payment Notification (IPN) for that. It’s not something that’s included with this library yet, but I do have an IPN template that is pretty popular. It’s not object-oriented, but it’s still very useful.
Hi Mr. Angell,
I’ve made the call DoDirectPayment.php from localhost to the PayPal’s Sandbox and I always get the error “10747″.
The descritpion of the error is: “The merchant entered an IP address that was in an invalid format. The IP address must be in a format such as 123.456.123.456.” However I can make other calls such as GetBalance.php and it works fine.
Can I make calls from localhost to the sandbox? If so, any idea why I got this error?
Thanks in advance!
I would need to get a look at your actual request getting generated to see what it’s not liking about your IP address value. As long as it doesn’t actually say “localhost” in that value, but contains a valid IP address, you should be fine.
Drew:
Thank you for the first PayPal class that I have seen that I can understand! Your gathering all the responses in an array that is printed in the example files was inspired.
I have run into a problem with the skipdetails parameter not working as you describe in your article on https://www.x.com/devzone/articles/paypal-payments-pro-php-class . Setting this parameter should cause exactly the behavior I want, but the PayPal page does not show the Pay button as described, and the buyer details are not returned.
Has PayPal changed their API so that your parameter no longer functions, or (probably more likely) have I misunderstood or misapplied it?
How to get Angell EYE PHP class and Adaptive Payments with Lightbox working:
http://www.thecrowned.org/paypal-adaptive-payments-api-embedded
That’s awesome! Glad my library helped and I appreciate the plug!
One thing I’ll say, though, is that you mention “apart from Adaptive Payments you can make any API call…” My library does support Adaptive Payments, so you can setup those calls the same way you do the standard API calls.
Nevermind, I just realized I was reading that incorrectly.
Hi,
Ive managed to use your libaray fine on local but upon trying it on live Im no longer having as much luck.
$PayPalResult = $this->paypal_pro->SetExpressCheckout($PayPalRequestData);
Undefined index: ACK
I also see there is no TOKEN set when I dump out that $PayPalResult, is that the reason? Im currently lost on how to resolve this though…
Much appreciated
I’d need to get a look at the actual request that’s getting generated. It would be in $PayPalResult['RAWREQUEST']. Please send that to me so I can get a look to try and help you figure out what you’re missing.
Much appreciated, Ive left sent the info via the contact form so not to clutter this page.
Hi, can you tell please how we do verify credit card holder name to match the firstname and lastname which were entered by user. I want to verify the credit card for authorization.
The name on the card is actually not included in any address confirmation, so there really isn’t any way to verify the name on the card. If you want to verify the card is good, though, you can authorize it using Payments Pro or Express Checkout. Just set the actiontype to Authorization in your API request.
Hello, Andrew!!
Great sharing!!
I just download your class of PayPAL. It has “tons” of valuable information.
I would like to know whether some classes can be applied for “PayPAL REST API” of compatible.
Thanks a lot indeed!!
Best regards,
I’m sorry for the delay getting back to you. I’m glad you like the information provided in the library. Most of that is simply pulled directly from PayPal’s documentation.
Unfortunately, my library is not yet compatible with the new REST API that PayPal released. I have already begun building it into my stuff and will be releasing an update as soon as possible that includes all of the new REST stuff.