Braintree and ActiveResource

Been playing around with accessing Braintree transactions from ActiveResource, using the Query API in particular. Thanks to the folks over at QuarkRuby, getting started was quite easy, so I figured I might as well post what I have for the uninitiated.

pastie

To get started using the API, use commands like the following:


t = Braintree.find(:all, :params => {:username => 'btdemo', :password => 'btdemo123', :last_name => 'Lin'})


t.each do |transaction|
transaction.gimme_my_money
end

Pretty straightforward stuff if you want to incorporate this into your Rails app, either for integration test verification or some admin pages.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Overrated, May 2008

Arguments about multiple Ruby VMs
Discussions about Twitter’s demise
Clueless clients
Every self-important blog posting I’ve read this month
Everything I said in April and May

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Recurring billing with Braintree and ActiveMerchant

If you’re using ActiveMerchant and want to setup recurring billing support for Braintree, you should be able to just modify the post parameters being sent across to include your recurring plan name in the following method in the Braintree gateway:

Braintree pastie

If you want to know more about ActiveMerchant, check out the Peepcode PDF. Should prove helpful.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Another Ruby VM

Excellent news from RailsConf regarging GemStone’s new Ruby VM. Although, with all this work, I do sorta wonder why can’t we just push Smalltalk more into the mainstream? Or is it already secretly mainstream?

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Designing Web Forms

If you do anything web design or development related or just have some free time on your hands and feel like contributing to an interesting independent publisher, I highly recommend checking out Luke Wroblewski’s book on web form design. While somewhere in my subconscious I’ve definitely been annoyed by filling out forms, I hadn’t really realized how pervasive, disruptive and generally poorly designed most web forms are until I started digging into this book. The sidebar stories in the book are really interesting as well.

web form design

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Harpers is Priceless

If you don’t already know about it, check my blogroll for Harper’s weekly updates. They’re just too damn good (and often depressing). From this past week:

House Republicans began using a new slogan, “the change you deserve,” which turned out to be the slogan of the antidepressant Effexor.11

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

There’s an Emacs Command for That

emacs butterfly command

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Favorite New Gap.com Feature

Gap recently redesigned their sites to support a single basket across all brands. Looks like every site is using a hidden iframe to register events that observe Prototype posts to the cart DOM element in the upper right. Probably some funky session stuff going on as well. Here’s my favorite feature:

gap.com obtrusive javascript

“Including the ability to purchase”. Hilarious. Nobodies perfect I guess.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Overrated, April 2008

Juno
Pitchfork recommendations
CSS frameworks
Javascript libraries
Insisting on always “rolling your own” (there’s a balance).
Tagging
A lot of Rails Plugins
Most social networks
Being a programmer
Being a manager of programmers
Being consistent
Being right
Having a strong opinion to blog about

What else?

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Visualizing Your Next Domain Name

Domains

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]