Class: Spree::AcledaRedirectsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/spree/acleda_redirects_controller.rb

Instance Method Summary collapse

Instance Method Details

#load_paymentObject



18
19
20
# File 'app/controllers/spree/acleda_redirects_controller.rb', line 18

def load_payment
  @payment = ::Spree::Payment.find_by(number: params[:payment_number])
end

#showObject



6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/spree/acleda_redirects_controller.rb', line 6

def show
  if @payment.present?
    options = {
      app_checkout: true
    }

    @client_redirect = ActiveRecord::Base.connected_to(role: :writing) do
      ::Vpago::Acleda::Checkout.new(@payment, options)
    end
  end
end