We’ve currently got a requirement to integrate credit card payment processing in a way where
- we can deal with some fairly strange, long-running business logic (payments that can take a month before they’re settled) and
- we don’t really want to store full credit card info for security and liability reasons.
As both Dan and Matt have had good experiences in the past when working with SecureTrading, and they can handle our strange payment flows without any trouble, we’ve decided to go ahead and write a gem to integrate our app with SecureTrading’s XPay gateway.
Our code could only charitably be called “pre-alpha” in its current form, but we have successfully run some transactions through the test gateway. 3-D Secure verification, beloved by application developers everywhere, works in our tests – our app shoots card info at BreadMachine, which does the 3-D Secure enrollment check. Based on what BreadMachine tells it, our app then either does a standard auth check for funds, or redirects to the acquiring bank’s 3D-Secure verification page. The user then punches in their info, and get redirected back to our app, which either does a 3-D Secure auth request for funds or tells the user to get lost depending on the results of the 3-D Secure verification check.
The whole process is a huge hassle from a development point of view, but it’s required for certain cards which see widespread use in the UK (such as Maestro), and may be required by many more acquiring banks in future despite the many criticisms of the system. As far as we can tell, we’re the first ones to attempt to deal with 3-D Secure in a rubygem format. ActiveMerchant don’t do it, and given the much more ambitious nature of their multi-gateway code, that’s probably a smart choice (there is a fork available which adds some 3-D Secure integration, though). However, if you’re using SecureTrading and need to do 3-D Secure (or regular) auth, you can
gem install breadmachine
or fork the code on Github.
The bulk of the code was written by Matt. Currently there are no plans to turn this into a multi-gateway gem, a la ActiveMerchant, but I guess it really depends on how forky people want to get with the code.
