Payment Gateway Framework
I've spent a fair amount of time ripping apart payment gateway modules lately. One thing that I've noticed, is that they pretty much all work generally the same way. Fill out the settings form for the api address and authentication, take the info from the payment form, post it to the api address, handle the reply. Wash. Rinse. Repeat. Oh, on occasion you need to make it into xml, then pass it over.
I'd REALLY like to see a generic way to do build this on the fly. No more hassle with having to find a payment gateway that works with the site. Business rules shouldn't have to bend to website rules. I shouldn't have to tell someone that they need to buy a new payment gateway because they went out and bought one that doesn't have a module for it already, or that someone has to pick from a list of modules (and there are surprisingly few US payment modules) for where they process their credit cards. I also shouldn't have to waste cycles building something that is relatively generic as a whole and has been done before but with slightly different values.
Mike


Comments
Excellent, Mike. This is
Excellent, Mike. This is exactly what I'd like to see happen, and is something I've wanted to make happen for some time now (see the stagnant http://www.paymentgatewaypro.com). I just had an IRC chat with Crell from d.o two days ago, and he offered up his Component module as a centralized way to implement pluggable systems like payment gateways and shipping quotes. The code is in his CVS sandbox on d.o and I'll be checking it out when I get a chance.
(I also look forward to preserving the ability to have multiple settings profiles for each payment gateway; would be very handy for systems like PayPal where you want to separate orders based on the order total to get the best rates.)
Not sure how to do this, or
Not sure how to do this, or if this has already been done, but another option would be able to build something like etsy, so that users can make their own stores on the site and all the payment processing can be done through the same gateway, but separated out easily to individual users.
Likewise, being able to request a payout. If I have an etsy like store, and I sell a product, I can either keep the money in my account, or request some or all of the money that I've earned, or have a selectable balance that once it reaches that level (like clips4sale), automate the request for payout.
Mike
This is something that really
This is something that really interests me as well. I have a number of ideas on how this should be done so that we can better support all the various payment gateways while still having a simple interface for developers to work with. And also making features like recurring payments work well.
I have actually started myself on some code for a new payments module although I am currently building this in Drupal 6. The main code is not depended on any Drupal version, so making it working in D7 will be fairly straight forward. At the moment it is somewhat experimental, but I think I have come up with a few good ideas to make payment processing work better and easier on developers.
I was just wondering if there were any plans for this aspect of commerce already?
Awesome news. To be honest,
Awesome news. To be honest, planning that out was going to be late June's work. If you've got code, that's gold... don't suppose you can put it up on GitHub or something? Feel free to start a new thread, as I'd love to brainstorm with you.
We're looking to implement
We're looking to implement SagePay on our toy shop. This post has come in pretty handy - thanks!