views:

333

answers:

3

What is a good PHP payment library that works with Paypal, Google Checkout and Authorize.net?

I did find this library but it is not maintained and doesn't offer Google Checkout. Is there other options such as a service that can handle those three or more gateways?

A: 

I kinda doubt that is. The fact is that Paypal, Google and Authorize.net work in different ways. Paypal handles the payment itself, and the API they expose to the developer is minimal and actually they have about 4 flavours of it (express, uk, payflow edition.. ). Google checkout as well is doing a lot of stuff in the background as integrates the checkout process itself. Authorize.net is just a payment gateway and passes more responsibility to the developer. They have a full and complex API and works only for US.

A suggestion. Take a look at Magento shopping cart as they implement paypal, google checkout and authorize.net modules in the default installation.

Elzo Valugi
I don't know about Magento... Sure it has these, but given their tight integration with Magento, he'll need weeks just to figure them out.
Manos Dilaverakis
this is true. I would probably study and implement each one separately in my project if this would be the case.
Elzo Valugi
A: 

I'm sure there are pure PHP systems out there. For example, there is Virtuemart that runs on the Joomla CMS platform, which supports a wide variety of payment gateways.

DisgruntledGoat
+1  A: 

Not only do they work different ways, each of these actually presents to the paying user in different ways. That means you can't really abstract them from the user, which means you really have to interface with each of them directly. There's no clean way to get around that.

The nearest alternative, then, is to find a wrapper (or set of wrappers) that allows you to internally manage them all similarly, so that you're not duplicating your efforts for each individual processor. I haven't found a dedicated library for this, but I've found a few options that are delivered with other frameworks. Magento has been mentioned; also Kohana, OpenCart, and even Zend Framework offer worthy and relatively modular solutions.

There are a few half-decent solutions mentioned here: http://stackoverflow.com/questions/1993814/php-payment-library

...specifically, this one has been referred/linked to a lot: http://www.stumbleupon.com/su/2sX5Ei/www.phpfour.com/blog/2009/02/php-payment-gateway-library-for-paypal-authorizenet-and-2checkout/

I did find this -- it purports to be a commercial solution to the problem, in case you're into that sort of thing -- but I doubt it really accomplishes quite what you're looking for: http://www.transaxdevelopers.com/PHP-Payment-Processing/PHP-Payment-Integration.asp

Another: http://www.flexsin.com/software-web-development/payment-gateway-integration.php

Brian Lacy