You are currently browsing the tag archive for the 'amazon' tag.

I’ve recently been working to integrate Amazon Simple Pay into an application. In general, this has been pretty straightforward, thanks to the simplepay gem, which was recently bumped to version 0.2.0. (Amazon also has their own Ruby sample for ASP integration, which came in handy for a first smoke test - though unfortunately at the moment the Amazon site is having trouble delivering that file).

For the most part, using the simplepay gem is quite straightforward. There’s a helper to build a payment form:


Click here to send us $120 every year
<%= simplepay_form_for(:subscription, {
  :amount                 => 120.00,
  :description            => "Annual Subscription",
  :recurring_frequency    => "1 year",
  :abandon_url            =>  amaz_abandon_customers_url,
  :collect_shipping_address => false,
  :immediate_return       =>  false,
  :ipn_url                =>  amaz_ipn_customers_url,
  :process_immediately    =>  true,
  :reference_id           =>  @customer.id,
  :return_url             =>  amaz_return_customers_url
}) %>

When Amazon executes callbacks, it sends a signature parameter along so that you can verify that the request is legitimate. This is the only spot where I ran into a little gotcha. The simplepay gem includes a helper to validate the parameters of a request to see if they match the signature, but you have to be sure to take out the parameters that Rails inserts before you call it:


def amaz_ipn
    params.delete('controller')
    params.delete('action')
     if AWS::SimplePay::IpnValidator.valid_ipn_post?
(Simplepay.aws_secret_access_key, params)
      # save the results somewhere
      render :action => 'show'
    else
      logger.info "bad request from Amazon Simple Pay"
      render :nothing => true, :status => 200
    end
  end

Also note that you should send back a 200 response even if you’re unable to verify the signature. This will prevent Amazon from sending the same request to you over and over again.

I think it’s about time that I started tracking the changes in Edge Rails, even though I don’t understand a bunch of the code. Pushing myself is good for technical growth.

Time to donate platelets again, in between pushing more bits around.

It’s off to the Red Cross for me again today.

  • Pool Party - Ruby gem to manage load balancing and failover with Amazon EC2 instances.
  • Ylastic - Another AWS management suite, “coming soon.”
  • Versions - Subversion client for OS X, now out in beta.

It’s school vacation week around here, so I’m looking forward to writing plenty of code.

Up early with an earthquake. Just like when I was a kid.

Rolled out big new features on two jobs last night. I wonder what the chance is of the clients not finding any major changes they want made?

  • Storage Space, the Final Frontier - Amazon is getting ready to add persistent storage volumes to S3. I think they’re still safely ahead of Google AppEngine as far as being a useful cloud computing platform goes.
  • Open Source Rails - Budding gallery for, well, open source Rails applications.
  • Grep in Project Command for TextMate - I need to take a look at this; I’m getting fed up with the sloth of TextMate’s built-in full-project search.

All of a sudden my plate is very full again. But good full: interesting projects, friendly clients. So I’m not complaining.

  • Our Most Fulfilling Web Service Yet - Amazon continues to expose more of its underlying business via web services. I’ll bet we see this one wrapped for Rails pretty quickly.
  • Big Name Companies Using Ruby on Rails - While this sort of list is nice to crow about (how many times have you seen “our software is in use by 450 of the Fortune 500″?), it’s ultimately uninformative unless you know what “using” means. A huge company has lots of corners where a single Rails project can sneak in without meaning jack about corporate acceptance.
  • Google Visualization API - It’s a good day for big companies to be opening access to useful code. There are some neat ways to display data available here with relatively low pain.

The new GrowlMail beta works with OS X 10.5.2 just fine. They ask that people not link to the beta URL, but if you need it and can’t find it drop me a line and I’ll point you in the right direction.

  • Firefox 3 Beta 3 - I’m running this full-time now, and it’s my browser of choice. Release notes here.
  • BrainBuster 0.8.0 - Logic-based captchas for Rails.
  • InfiniteBits - Web and FTP access to Amazon S3. Looks interesting, though other tools (like Transmit) are adding direct FTP integration these days too.

I wrote a whole 39 lines of code yesterday. I was proud of myself, till I realized about half of them weren’t the right lines of code. At least I didn’t ship them.

Yesterday’s lesson: mystery site errors may just mean that ferret has gone off into never-never land.

  • AWS Scratch Pads - Turns out Amazon has built simple online forms to let you play with their various public web services. You’ll need an AWS developer key to mess around here.
  • Testing for ruby 1.8 and 1.9 using multiruby - How to have your code and eat it too. Multiruby lets you simultaneously run test suites on two side-by-side versions of ruby.

We had a fine Christmas here, though as I spent a few minutes of it restarting stuck mongrel instances I think I need to move forward on getting monit in place today.

  • Ruby 1.9.0 is Released - The official announcement. Sheesh, I’m not done learning 1.8.x yet!
  • Ruby 1.9.0 has been released - Chu Yeow’s coverage of what this means for Rails (summary: it’s not time to switch yet).
  • Ruby 1.9—Right for You? - Dave Thomas points out that this is not a production release, and discusses how he’s set up side-by-side installations with Ruby 1.8.x.
  • Ruport 1.4 - New release of this business reporting toolset for Ruby.
  • Paginatin’ Christmas - A pile of resources around the will_paginate plugin.
  • EC2 Firefox Extension is now Open Source - Looks useful for those who are managing their infrastructure via Amazon Web Services.
  • Jungle Disk - I’ve been using Mozy for online backups, but for some reason that’s been getting increasingly unreliable for me. Now that Jungle Disk can do automatic backups, I’m probably going to switch. The one thing I don’t know is whether it’s smart about only backing up changed files.
  • Triple Christmas Present - Hobo 0.7.1 with some new documentation.
  • REST In Place - AJAX in-place editor plugin designed to work with Rails RESTful controllers.

Yesterday was one of those days for tracing through code for two hours and then writing five characters to fix a bug. They were the right five characters, though.

  • Stacks Overlays - I got sick of the stupid default appearance of OS X stacks and installed this fix.
  • Firefox 3 Beta 2 - I’ve been using Firefox 3 as my default browser since beta 1 came out. It’s been quite stable for me.
  • GemInstaller - Automated management tool for Ruby gems, designed to avoid the “but it works on my machine” syndrome when moving to production (among other issues).
  • Amazon DevPay - Limited Beta - Yet another new service from the Amazon Web Services team: billing and account management.

I got Merb and DataMapper installed from their respective SVN repositories yesterday and immediately hit a roadblock. I suspect this Mac is suffering a small case of versionitis at this point. I wonder if I know enough to solve it yet.

It’s the Thanksgiving holiday here. With luck that will mean fewer interruptions than usual, and I can actually get some work done.

  • RubyWorks Production Stack on Amazon EC2 - Capistrano recipes for getting up and running quickly on your shiny new EC2 instance.
  • AddonUpdateSecurity - The first major annoyance I’ve hit in Firefox 3. With their newly-tightened security, you cannot install an extension that isn’t hosted securely (like, say, BugMeNot). I understand the arguments for this, but just like version compatibility issues, I think you ought to be able to set a key to shoot yourself in the foot if you want.

Woo, starting another consulting job today, without a speck of MS stuff in sight. I feel all vindicated and stuff.

  • iStat Menus - There are about a million different Mac system monitors out there. This one is free and doesn’t take up screen real estate when you don’t want it to.
  • VSS to SVN: Part 3 - This tutorial for source code control switchers continues.
  • Ruby on Rails EC2 ‘Appliance’ - Practically turnkey Rails deployment to the Amazon server cloud. (via Ruby Insie)
  • Sake Bomb - Sake is system-wide Rake. Looks like it still has some warts, but is already useful

Yeah, I’ve been MIA for a few days. Life has been pretty hectic. Here are a few liks to make up for that.

Mike Clark has another interesting post today, Getting Started with the Amazon S3 Library for Ruby , exploring yet another spiffy Ruby library. I continue to be impressed with some of the things that people have wrapped up in small amounts of Ruby code - and happy that I don’t have to cart them all around with me in some super-giant-mega framework when I don’t need them.

Computing in the cloud is a basic look at Amazon’s EC2, which is such a neat concept that it really feels like there must be a use for it.