refactoring

This commit is contained in:
olegphenomenon 2022-04-06 10:32:44 +03:00
parent 8812f8da22
commit 363dd8370f
4 changed files with 7 additions and 2 deletions

View file

@ -11,7 +11,11 @@ module EisBilling
registrar = invoice.buyer
bank.create_activity(registrar, invoice)
render status: :ok
respond_to do |format|
format.json do
render status: :ok, content_type: 'application/json', layout: false, json: { message: 'ok' }
end
end
end
private

View file

@ -21,6 +21,7 @@ class DirectoInvoiceForwardTwoJob < ApplicationJob
Rails.logger.info "[DIRECTO] Invoice #{invoice.number} has been skipped"
next
end
collected_data << invoice.as_directo_json
end

View file

View file

@ -12,7 +12,7 @@ Rails.application.routes.draw do
end
namespace :eis_billing do
put '/payment_status', to: 'payment_status#update', as: 'payment_status'
put '/payment_status', to: 'payment_status#update', as: 'payment_status', :format => false, :defaults => { :format => 'json' }
put '/directo_response', to: 'directo_response#update', as: 'directo_response'
put '/e_invoice_response', to: 'e_invoice_response#update', as: 'e_invoice_response'
post '/lhv_connect_transactions', to: 'lhv_connect_transactions#create', as: 'lhv_connect_transactions'