Sha256: 692253967baa534e49eff699c4e1dacbb7407cb387713b08686661b3a71ddc21
Contents?: true
Size: 797 Bytes
Versions: 1
Compression:
Stored size: 797 Bytes
Contents
class Wepay::AuthorizeController < Wepay::ApplicationController def index ref_id, code = if params[:refID].include?('?') parts = params[:refID].split('?') key,val = parts[1].split('=') [parts[0], (key == 'code' ? val : '')] else [params[:refID], params[:code]] end wepayable = wepayable_class.find(:conditions => ["#{wepayable_column} = ?", ref_id]) rescue => e raise AuthorizationError.new("WepayRails was unable to find the record to save the auth code to. : #{e.message}") unless wepayable.present? wepayable.update_attribute(wepayable_column.to_sym, code) redirect_to WepayRails::Configuration.settings[:after_authorize_redirect_uri] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wepay-rails-0.1.108 | app/controllers/wepay/authorize_controller.rb |