Module: Wirecard::Payify

Extended by:
ActiveSupport::Concern
Included in:
PaymentsController
Defined in:
app/controllers/concerns/payify.rb

Instance Method Summary collapse

Instance Method Details

#build_current_paymentObject Also known as: current_payment


9
10
11
# File 'app/controllers/concerns/payify.rb', line 9

def build_current_payment
  @current_payment ||= current_payment_parent.payments.new(payment_params)
end

#current_payment_parentObject


15
16
17
18
19
20
21
# File 'app/controllers/concerns/payify.rb', line 15

def current_payment_parent
  @current_payment_parent ||= if (current_payment_parent = NotificationDelivery.find_active_by_uuid(params[:casefile_id] || params[:id])).payable?
    current_payment_parent
  else
    raise ActiveRecord::RecordNotFound
  end
end