Skip to content

Commit

Permalink
revert flash.keep thing
Browse files Browse the repository at this point in the history
  • Loading branch information
nov committed May 16, 2011
1 parent 05cfbff commit e9d7af5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions app/controllers/payments_controller.rb
Expand Up @@ -47,20 +47,14 @@ def client


def handle_callback def handle_callback
payment = Payment.find_by_token! params[:token] payment = Payment.find_by_token! params[:token]
redirect_uri = yield payment @redirect_uri = yield payment
if payment.popup? if payment.popup?
close_flow redirect_uri render :close_flow, layout: false
else else
redirect_to redirect_uri redirect_to @redirect_uri
end end
end end


def close_flow(redirect_uri = root_url)
@redirect_uri = redirect_uri
flash.keep
render :close_flow, layout:false
end

def paypal_api_error(e) def paypal_api_error(e)
redirect_to root_url, error: e.response.details.collect(&:long_message).join('<br />') redirect_to root_url, error: e.response.details.collect(&:long_message).join('<br />')
end end
Expand Down

0 comments on commit e9d7af5

Please sign in to comment.