Tuesday, June 28, 2011

PayPal Integration

Howdy!

OK, so lately I've been talking about things I like, so I thought I'd also write about something I really really hate: PayPal integration.

PayPay has a pretty large documentation, but quite honestly I find most of it useless. To get something done, you have to either ask on the forums (which are really helpful) or download some sample code from them, to see how things should be done, so that you can write your own code. The only problem is that their sample source codes are pretty well hidden. It took me about 15 minutes to find it on Google (usually it takes me maximum 5 minutes). So after finding the source code, downloading it and running it, everything is fine. The code works perfectly, and is pretty easy to understand.

Several weeks ago I integrated direct payments and pre-approved payments (for the ones who know what I'm talking about) and let me tell you: it was a pain in the ass. It took me about 1 week to get the basic stuff working, which is unacceptable. Now I really have a better understanding of how PayPal actually works, tho, so I think it was worth it.

Anyways, for the ones who want to do this (with PHP), you will need: solid PHP knowledge, cURL understanding, to read the PayPal documentation thoroughly and a lot of patience and calm.

Also, for the ones who want a more "basic" integration (with PayPal IPN -- Instant Payment Notification), there is a class written in PHP located here, which will help you a lot and is very easy to use.

See y'all next time.

2 comments:

  1. Thanks a lot. Any updates in aug 2014 ? With full source code sample in C# .NET ?

    IMHO, better samples for minimize learning curve are real applications with full source code and good patterns.

    ReplyDelete
  2. I'm afraid I haven't done any more work with PayPal since this post, so I don't have any updates.
    I agree that full apps are the best for learning, but back in 2011 PayPal had little or no such thing. And the code samples it did have were poorly written and needed refactoring. Not sure how things are now; they may have improved their documentation and code samples. Maybe it's worth taking a look.

    ReplyDelete