lib/helpers/controller_helpers.rb in wepay-rails-0.1.93 vs lib/helpers/controller_helpers.rb in wepay-rails-0.1.94
- old
+ new
@@ -24,10 +24,11 @@
# &client_secret=[your client secret]
# &code=[the code you got in step one]
#
# Response
# {"user_id":"123456","access_token":"1337h4x0rzabcd12345","token_type":"BEARER"} Example
- def initialize_wepay_access_token(auth_code)
+ def initialize_wepay_access_token(wepayable_object) #auth_code)
+ auth_code = wepayable_object.send(WepayRails::Configuration.wepayable_column.to_sym)
session[unique_wepay_access_token_key] = wepay_gateway.access_token(auth_code)
return
rescue WepayRails::Exceptions::ExpiredTokenError => e
redirect_to_wepay_for_auth(wepay_gateway.scope) and return
end
\ No newline at end of file