Logo Devoh

Amazon FPS in Ruby

The Amazon Flexible Payments Service looks like a great addition to the payment services arena, and if it's anywhere near as popular as their other services have been then this one will surely be a huge success. The rates are significantly less than those of both PayPal and Google Checkout, and their API looks like it offers more functionality through a cleaner interface.

When I first started looking into using FPS with Ruby, I downloaded Amazon's sample code, but was quickly discouraged by the complexity of their example. My disappointment basically boils down to a deap-seated hatred for SOAP, and when you throw encryption with X.509 into the mix, it just becomes way too verbose for my liking, and doesn't really fit in with the Rubyist philosophy.

Then I discovered that there's a REST version of the API available that offers nearly all of the functionality of the SOAP API. I don't know why they seem to be hiding the REST capabilities, especially after hearing from Brian LeGros that the majority of applications consuming Amazon services are using REST. Every sample they're provided for FPS uses SOAP, except for a single REST example in Java of all languages.

So, I've begun working on a Ruby API for FPS over REST, and things are progressing fairly nice now that I've gotten over a silly snag that I had early on. I've come up with a clean way to implement each action in the API and still keep things pretty DRY. I'll try to post more about the development process as it progresses.

and tagged with api and ruby