Created
April 18, 2013 16:55
-
-
Save gbelote/5414337 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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