Last active
December 12, 2015 12:19
-
-
Save Swizec/4771602 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
buyer = Balanced::Account.find customer_token | |
if seller.customer_token.nil? || seller.customer_token =~ /cus_/ | |
puts 'creating seller and setting token' | |
# this throws error | |
seller_account = Balanced::Marketplace.my_marketplace.create_account(:email_address => seller.email) | |
puts "I got this!" | |
seller_merchant_uri = seller_account.uri | |
seller.customer_token = seller_merchant_uri | |
puts 'seller token' | |
seller.save! | |
puts seller.customer_token | |
else | |
seller_merchant_uri = seller.customer_token | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment