fixed reload balance and directo

This commit is contained in:
olegphenomenon 2022-04-18 11:50:33 +03:00
parent 443643d937
commit 368e904d5e
4 changed files with 13 additions and 14 deletions

View file

@ -22,6 +22,12 @@ class DirectoInvoiceForwardJob < ApplicationJob
next next
end end
p ">>>>>>>>>>>>>>> invoice"
p invoice
p ">>>>>>>>>>>>>>>>>> invoice as directo"
p invoice.as_directo_json
p ">>>>>>>>>>>>>>>>>>>>>.."
@client.invoices.add_with_schema(invoice: invoice.as_directo_json, schema: 'prepayment') @client.invoices.add_with_schema(invoice: invoice.as_directo_json, schema: 'prepayment')
end end

View file

@ -12,6 +12,10 @@ module EisBilling
initiator: INITIATOR, initiator: INITIATOR,
} }
p ">>>>>>>>>>>>>>>>>>>>>...prepared_data.to_json"
p prepared_data.to_json
p ">>>>>>>>>>>>>>>>>>>>>"
http = EisBilling::Base.base_request(url: directo_url) http = EisBilling::Base.base_request(url: directo_url)
http.post(directo_url, prepared_data.to_json, EisBilling::Base.headers) http.post(directo_url, prepared_data.to_json, EisBilling::Base.headers)
end end

View file

@ -5404,7 +5404,6 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220106123143'), ('20220106123143'),
('20220113201642'), ('20220113201642'),
('20220113220809'), ('20220113220809'),
<<<<<<< HEAD
('20220124105717'), ('20220124105717'),
('20220216113112'), ('20220216113112'),
('20220228093211'), ('20220228093211'),
@ -5413,15 +5412,5 @@ INSERT INTO "schema_migrations" (version) VALUES
('20220413073315'), ('20220413073315'),
('20220413084536'), ('20220413084536'),
('20220413084748'), ('20220413084748'),
('20220504090512'); ('20220504090512'),
======= ('20220406085500');
('20220406085500'),
('20220413073315'),
('20220413084536'),
('20220413084748'),
('20220124105717'),
('20220216113112'),
('20220228093211'),
('20220316140727'),
('20220412130856');
>>>>>>> fixed structure sql conflict

View file

@ -17,7 +17,7 @@ namespace :registrars do
next if reload_pending || !threshold_reached next if reload_pending || !threshold_reached
Registrar.transaction do Registrar.transaction do
registrar.issue_prepayment_invoice(reload_amount) registrar.issue_prepayment_invoice(reload_amount, 'reload balance')
registrar.settings['balance_auto_reload']['pending'] = true registrar.settings['balance_auto_reload']['pending'] = true
registrar.save! registrar.save!
end end