Class: Payments::IntegrationsController

Inherits:
BaseController show all
Defined in:
app/controllers/payments/integrations_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#failObject



36
37
38
39
# File 'app/controllers/payments/integrations_controller.rb', line 36

def fail
  find_structure('payments-fail')
  respond_with @structure, layout: 'cabinet'
end

#newObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/payments/integrations_controller.rb', line 9

def new
  options = { template: "payments/integrations/providers/#{@payment_type.code}", formats: [:html] }

  if @payment_type.wire_transfer?
    options[:layout] = 'cabinet'
    find_structure('payments-wire-transfer')
  else
    set_payment_to_session(@payment)
  end

  render options
end

#successObject



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/controllers/payments/integrations_controller.rb', line 22

def success
  find_structure('payments-success')
  theme = params[:theme] || 'success_terms'
  # theme = 'evaluation_terms'

  # _template = "success"
  # if params[:order_id] && current_account
  #   _template = "affiliate" if @order.has_new_affiliate_payment?(params[:token]) if params[:token]
  # end
  # render template: "payments/integrations/#{_template}", layout: "cabinet"

  respond_with @structure, layout: 'cabinet', locals: { theme: theme }
end