Class: Barion::MainController

Inherits:
ApplicationController show all
Defined in:
app/controllers/barion/main_controller.rb

Overview

Barion engine’s main controller to receive callback and redirects

Instance Method Summary collapse

Instance Method Details

#callbackObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/barion/main_controller.rb', line 8

def callback
  @payment = ::Barion::Payment.find_by_payment_id(payment_params)
  if @payment.present?
    head :ok
    @payment.refresh_state
  else
    head :unprocessable_entity
  end
end

#landObject



18
19
20
# File 'app/controllers/barion/main_controller.rb', line 18

def land
  @payment = ::Barion::Payment.find_by_payment_id(payment_params)
end