app/controllers/registrar/payments_controller.rb
# to handle existing model we should
# get invoice_id and then get number
# build BankTransaction without connection with right reference number
# do not connect transaction and invoice
to handle existing model we should
get invoice_id and then get number
build BankTransaction without connection with right reference number
do not connect transaction and invoice
to handle existing model we should get invoice_id and then get number build BankTransaction without connection with right reference number do not connect transaction and invoice
def pay
    invoice = Invoice.find(params[:invoice_id])
    @bank_link = BankLink::Request.new(params[:bank], invoice, self)
    @bank_link.make_transaction
  end
def pay invoice = Invoice . find ( params [ :invoice_id ] ) @bank_link = BankLink :: Request . new ( params [ :bank ] , invoice , self ) @bank_link . make_transaction end
to handle existing model we should
get invoice_id and then get number
build BankTransaction without connection with right reference number
do not connect transaction and invoice
to handle existing model we should get invoice_id and then get number build BankTransaction without connection with right reference number do not connect transaction and invoice