Skip to content

Instantly share code, notes, and snippets.

@mjallday
Created August 23, 2012 23:33
Show Gist options
  • Save mjallday/3443511 to your computer and use it in GitHub Desktop.
Save mjallday/3443511 to your computer and use it in GitHub Desktop.
Balanced Merchant Redirect Simulator
import balanced
key = balanced.APIKey().save()
balanced.configure(key.secret)
marketplace = balanced.Marketplace().save()
try:
balanced.Marketplace.my_marketplace.create_merchant('conflict@example.org',
merchant={
'type': 'person',
'name': 'Reginald F. Merchant',
'dob': '1980-01',
'phone_number': '(904) 628-1799',
'street_address': '801 High St, Suite 200',
'postal_code': '99999',
'region': 'EX',
'country_code': 'USA'
})
except balanced.exc.MoreInformationRequiredError as ex:
print 'REDIRECT!!!', ex
curl -X POST https://api.balancedpayments.com/v1/marketplaces/TEST-MP6IEymJ6ynwnSoqJQnUTacN/accounts \
-u 7b7a51ccb10c11e19c0a026ba7e239a9: \
-d email_address="conflicto@example.org" \
-d bank_account_uri="/v1/marketplaces/TEST-MP6IEymJ6ynwnSoqJQnUTacN/bank_accounts/BA63ba122e9e0c11e18ba9024f5cb9b783" \
-d merchant[type]="person" \
-d merchant[name]="William James" \
-d merchant[street_address]="801 High St" \
-d merchant[postal_code]="99999" \
-d merchant[region]="EX" \
-d merchant[country]="USA" \
-d merchant[dob]="1842-01" \
-d merchant[phone_number]="+16505551234"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment