3 ms·
You can consider trying what we did: Wrap Active Merchant in a lightweight web service which exposes a RESTful API that Java (or any language) can talk to.
by rudiger 16y ago
You can consider trying what we did:
Wrap Active Merchant in a lightweight web service which exposes a RESTful API that Java (or any language) can talk to.
- technomancy 16y agoCould try JRuby too.
- sandGorgon 16y agoThis is how you can invoke jruby from inside Spring http://static.springsource.org/spring/docs/2.0.4/reference/dynamic-language.html http://static.springsource.org/spring/docs/2.0.4/reference/d... Or you can use warbler to bundle your ruby app into a deployable WAR file: http://caldersphere.rubyforge.org/warbler/ http://caldersphere.rubyforge.org/warbler/ If you do manage to get it working, it would be great to have a blog post on it.
- aneth 16y agoSplintering an application into multiple stacks, languages, wrappers, etc. just to add pretty simple functionality from a library is not a good solution for a large number of reasons. Using JRuby or a REST API to a Rails app is the kind of complication to an app you desperately want to avoid.
- rudiger 16y agoIt may seem like "pretty simple functionality", but... Active Merchant "raison d'être" was Shopify's requirements for a simple and unified API to access dozens of different payment gateways with very different internal APIs. Abstracting the APIs for dealing with credit cards and payment processors was core to Shopify's business, and they open-sourced what could have easily been kept closed. This abstraction is hard work, not the kind of work I want to do, and I'd rather use their robust library than roll my own or use another poorly-tested one. We package and deploy Active Merchant in a single, stand-alone .jar file. We don't use Rails (Active Merchant works excellently as a stand-alone library). It's not as complicated as you think.
- aneth 16y agoYeah, or I could use a framework that includes this. I don't want to have to deploy multiple stacks just because of something like this. I was deterred from using Java at all figuring if a payment lib isn't available, it's not the only thing that's going to be missing. Btw, I was a java developer for 6 years. I was looking forward to type checking, but the closed community was too much to handle after experiencing the ruby world.