Skip to content

Instantly share code, notes, and snippets.

@wehub
Created April 21, 2017 19:54
Show Gist options
  • Select an option

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

Select an option

Save wehub/e094dd45db650150c185c2b651d65aa3 to your computer and use it in GitHub Desktop.
# WePay Ruby SDK - http://git.io/a_c2uQ
require 'wepay'
# application settings
account_id = 123456789 # your app's account_id
client_id = 123456789
client_secret = '1a3b5c7d9'
access_token = 'STAGE_8a19aff55b85a436dad5cd1386db1999437facb5914b494f4da5f206a56a5d20' # your app's access_token
checout_id = 7734724523235
# set _use_stage to false for live environments
wepay = WePay::Client.new(client_id, client_secret, _use_stage = true)
# create the checkout
response = wepay.call('/checkout', access_token, {
:checkout_id => checkout_id
})
# display the response
p response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment