Skip to content

Instantly share code, notes, and snippets.

@wehub
Last active September 5, 2019 23:51
Show Gist options
  • Select an option

  • Save wehub/bdd832cb1dabf6e0b814dbf9aadc7e09 to your computer and use it in GitHub Desktop.

Select an option

Save wehub/bdd832cb1dabf6e0b814dbf9aadc7e09 to your computer and use it in GitHub Desktop.
# WePay Ruby SDK - http://git.io/a_c2uQ
require 'wepay'
# application settings
client_id = 9543125 # your WePay application's client ID
client_secret = '1a3b5c7d9' # your WePay application's client secret
access_token = 'STAGE_8a19aff55b85a436dad5cd1386db1999437facb5914b494f4da5f206a56a5d20' # the user's access token
# set _use_stage to false for live environments
wepay = WePay::Client.new(client_id, client_secret, _use_stage = true)
# create an account for a user
response = wepay.call('/account/create', access_token, {
:name => 'Account Name',
:description => 'A description for your account.'
})
# display the response
p response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment