Class: MpayCallbacksController

Inherits:
Spree::BaseController
  • Object
show all
Defined in:
app/controllers/mpay_callbacks_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/mpay_callbacks_controller.rb', line 2

def index

  @order = BillingIntegration::Mpay.current.find_order(params["TID"])
  
  order_params = {:checkout_complete => true}
  session[:order_id] = nil
  flash[:commerce_tracking] = "Track Me in GA"

  # TODO: this should not be rendered into the IFRAME but in the surrounding page
  # redirect_to order_url(@order, {:checkout_complete => true, :order_token => @order.token})
  render :partial => "shared/mpay_success", :locals => { :final_url => order_url(@order, {:checkout_complete => true, :order_token => @order.token})}
end