Raja Afrika of the Afrika 8
Sunday, December 22, 2024
 
Back to Raja's Blog

Raja's Blog
Not All Who Wander Are Lost

Working with the PayPal Name Value Pair API
Posted: Sunday, March 21, 2010

First of all let me just say that working with the PayPal NVP API is challenging to say the least. PayPal has not 1, not 2 but 3 different developer sites for their APIS, each with slightly differnt documentation. It is possible to review documentation and developer feedback on PayPal.com, beta-developer.paypal.com, cms.paypal.com and of course PayPals new (and obviously still under construction) X.COM.


I thought the X.COM was cool because it is easy to remember but as of this writing (3/21/2010), this site is still riddled with mis-information and documentation so poorly written it is hard to believe that this site is available to the public. I wasted A LOT of time, trying the various sites and the numerous techniques listed there. Here is what I finally got to work:

I am using VB.NET and PayPal NVP to communicate with PayPal's sandbox website.


The sandbox environment that I got to work for recurring payments is:
cms.paypal.com


Still, with this info it is still possible to waste A LOT of time. Navigating all of this mis-information might be an industry niche in and of itself. What finally did the trick for getting me going was using the Integration Wizard under cms.paypal.com. This wizard generated code sufficient to get me communicating successfully with PayPal's sandbox server which was really half the battle. The problem appeared to be URL encodding the data in a manner that PayPal will accept and decdding the returned information consistently. The Integration Wizard amugst other things will generate ENCODER and DECODER code that is really the key to successfully submitting a request and getting a useful response from PayPal NVP.

Make sure to CAREFULLY review the NVP API .PDF and also the ExpressCheckout Overview .PDF. With this information I could have possibly shaved 4 months off of my development time. Live and learn. Hopefully you, oh brave developer will benefit from my adventures. Best of luck and feel free to email me a question if you are stuck :-).

All the Best,

Martin Welch