remove uneccessary code, adapted to eis billing response, fix logging error

This commit is contained in:
olegphenomenon 2022-01-24 13:32:06 +02:00
parent d1e64577b4
commit ac3244466e
6 changed files with 6 additions and 69 deletions

View file

@ -18,7 +18,7 @@ module EisBilling
bank = create_bank_transfer(invoice: invoice, sum: sum, paid_at: paid_at)
create_payment_order(invoice: invoice, everypay_response: everypay_response, payment_status: payment_status)
registrar = Registrar.find_by(reference_no: params[:reference_number])
registrar = invoice.buyer
bank.create_activity(registrar, invoice)
render status: 200, json: { status: 'ok' }
@ -58,7 +58,7 @@ module EisBilling
bank.save
logger.info '++++ BANK TRANSACTION ERRORS ? ++++'
looger.info bank.errors
logger.info bank.errors
bank
end

View file

@ -25,10 +25,9 @@ class Registrar
def send_invoice_data_to_billing_system
add_invoice_instance = EisBilling::AddDeposits.new(@invoice)
result = add_invoice_instance.send_invoice
link = JSON.parse(result.body)['everypay_link']
p "+++++++++++++ result"
p JSON.parse(result.body)['everypay_link']
p "+++++++++++++"
@invoice.update(payment_link: link)
end
def deposit_params

View file

@ -14,11 +14,6 @@ class Registrar
end
def show
invoice = Invoice.find(params[:id])
link_handler = EisBilling::GetInvoiceLink.new(invoice.number)
response = link_handler.send_request
@everypay_link = JSON.parse(response.body)['payment_link']
end
def cancel