lib/helpers/controller_helpers.rb in wepay-rails-0.1.112 vs lib/helpers/controller_helpers.rb in wepay-rails-0.1.113
- old
+ new
@@ -6,11 +6,11 @@
# Initially set a reference ID to the column created for the wepayable
# so that when the redirect back from wepay happens, we can reference
# the original wepayable, and then save the new auth code into the reference ID's
# place
ref_id = Digest::SHA1.hexdigest("#{Time.now.to_i+rand(4)}")
- session[:wepay_auth_code_ref_id] = ref_id
+ session[unique_wepay_auth_token_key] = ref_id
wepayable_object.update_attribute(WepayRails::Configuration.wepayable_column.to_sym, ref_id)
redirect_to wepay_gateway.auth_code_url(wepayable_object)
end
@@ -44,9 +44,13 @@
# Since we are saving the access token in the session,
# ensure key uniqueness. Might be a good idea to have this
# be a setting in the wepay.yml file.
def unique_wepay_access_token_key
:IODDR8856UUFG6788
+ end
+
+ def unique_wepay_auth_token_key
+ :J8876GFUU6588RDDO
end
# Access token is the OAUTH access token that is used for future
# comunique
def wepay_access_token
\ No newline at end of file