Paypal integration services - a starter guide, and review of the process.
Posted by: Floresense Team
This article is a review of Paypal's integration services provided to merchants or websites or web applications. Here, I have placed my experiences with integrating paypal services into applications that I have developed or developing. This article is also a quick starter guide for beginners trying to understand the overwhelming amount of information at Paypal integration websites.
Firstly, It is easy to integrate Paypal payments into a website if we choose to do it through a webform. That is, If your user clicks on a 'Pay Now' and you want to redirect to Paypal-served secured website for processing the payment, then it is easy. This is well-documented too.
Paypal calls this: Website standards integration.
And for website standards integration, all you need: 1. Website Payment standards integration guide - to integrate Paypal payment hidden fields into your webform. (other common, helpful resources linked at the end of this post)
But, if you chose to do it from your own code, using API calls, through SOAP or direct socket based http requests (called Name-value pair API development or NVP at Paypal), then you enter into a not-so-well documented world. Also, Paypal has its webservice definition so intrigued, even simple things are on purpose made complex, and you would easily get discouraged using Paypal API services especially SOAP based services.
For API integration and samples, all you need: 1. SOAP API Referrence 2. Paypal webservice URL 3. Paypal webservice URL - sandbox(test engine) 4. Paypal webservice endpoint URL : https://api-3t.paypal.com/2.0/ 5. Paypal webservice endpoint URL - sandbox : https://api-3t.sandbox.paypal.com/2.0/ (other common, helpful resources linked at the end of this post)
More details on SOAP API integration, with samples using a SOAP engine called NuSOAP can be found in this article.
And, why would I think they made it complex "on purpose"?? because it happens in the technology world often... in an attempt to discourage too many not-so-serious users from testing your web services just for the sake of learning...or sometimes hacking, you would decide to make your services complex for a beginner, and further not document it well...or give useful, easy-to-understand example code.
For reasoning, Paypal provides a download of sample code for its SOAP webservices, I choose the one with PHP samples, and each example easily includes more than 5 files and doesn't make anything clear on how it is done.
For me, it is after-all a webservice client call, and having more than 5 files of integrate and all is too much overhead and lot of unneccessary lines of code and complexity. You even have an installation to make on your machine to make it work.. it generates some files during installation, and often expects some PHP extensions to exist without which installation will not even start.
In my understanding, Webservice client calls are supposed to be easy, like black-box calls, quick ways to integrate otherwise complex systems to talk to each other.. and get work done in minutes.. not something you can write tutorial books about, or provide certifications for. Yes, they have this Paypal developer certifications. Now that is another reason, why they are probably making things complex on purpose.
Cheaper through API: With all that expression and review of Paypal integration systems, I would like to mention a not-so-known fact here.. Looks like if you sent or received payments through Paypal API services, you save on Paypal fee a lot.
For example, there is this MassPay procedure call, with which you can send money from 1 to 250 different recipients at one go, and the maximum fee that is charged is only 2$ for the entire transaction(not per person). The reduction is because through API services, you hit Paypal systems or resources only once or twice.. and it is less work and load for Paypal to manage.
For this reason I think all services, importantly payment acceptance services are cheaper too. Just check up their API integration documents, or sometimes you have to test an API call through Paypal's sandbox, and then you will look at the transaction details to find out how much they charge you with and without API calls to know the difference.
Great 'Sandbox' for testing: I should say, Paypal's sandbox test suite, alongwith Paypal developer central website, and the Sandbox user's guide, offer an excellent test bench indeed for testing Paypal integration into your application. Whatever you can do with the normal Paypal website and systems are all enabled in Sandbox also.
I haven't seen any other payment gateway provide such exclusive and extensible test bench. And importantly, it is easy to move into production from testing with zero code changes.
All you need to understand the sandbox test bench in detail: Paypal sandbox user's guide.
This sandbox thing, alongwith a very helpful paypal developer community forum, easily diminishes all the other starter problems you might have and make the integration experience worthy and successful...though only after a couple of hours at a minimum.
Common, helpful resources - Required for testing, or learning the integration structures Paypal has made: 1. Paypal integration service website 2. Paypal developer community - a very helpful forum for your questions 3. Paypal sandbox user's guide - very useful guide detailing all testing methods 4. Order Management integration guide - this covers two methods PDT and IPN that Paypal provides to all integrators, to confirm success of transactions.
All documents/integration guides for different types of paypal integration, like express checkout, website standard, mobile checkout, can be found here.
Note: 1. Make sure, you read the sandbox guide before integrating paypal payments into any site, because the guide tells you how you can create test paypal accounts and dummy money to test your integration any number of times to go live reliably.
2. For production systems, you will need a Paypal pro/business account.. the free / premium accounts don't allow all the above integration. The pro/business accounts also are free in a way, they don't have any setup or monthly fees.. only that for some transactions Paypal takes a little <fee link>higher fee</fee link> because it provides all these services, also allowing you to accept credit card/e-check and bank transfer modes of payment.
Advertisement
|