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.
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.