Skip to content

Instantly share code, notes, and snippets.

@gbelote
Created April 18, 2013 16:55
Show Gist options
  • Save gbelote/5414337 to your computer and use it in GitHub Desktop.
Save gbelote/5414337 to your computer and use it in GitHub Desktop.
require 'balanced'
BALANCED_MARKETPLACE_URI = ENV['BALANCED_MARKETPLACE_URI']
BALANCED_SECRET_KEY = ENV['BALANCED_SECRET_KEY']
uri = ENV['URI']
Balanced.configure(BALANCED_SECRET_KEY)
bank_account = Balanced::BankAccount.find(uri)
verification_uri = Balanced::BankAccount.find(uri).verify().uri
verification = Balanced::Verification.find(verification_uri)
verification.confirm 1, 1
account = Balanced::Marketplace.my_marketplace.create_account
account.add_bank_account bank_account.uri
1) Open https://staging.wefunder.com/ and run tokenize in the console (via copy/paste). Grab the resulting URI
2) Run associate.rb with the balanced 0.7.0 gem from github (as of yesterday):
URI="... uri from tokenize.js ..." BALANCED_MARKETPLACE_URI="..." BALANCED_SECRET_KEY="..." ruby associate.rb
balanced.bankAccount.create(
{name: "demo mcgee", account_number: "9900000000", routing_number: "021000021", account_type: "checking"},
function(res) { console.log(res.data.uri) }
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment