mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 05:26:17 +02:00
added billing staging endpoint
This commit is contained in:
parent
5e0d1ff619
commit
61c90b73ca
4 changed files with 26 additions and 4 deletions
|
@ -7,7 +7,12 @@ module EisBilling
|
|||
# irb(main):048:0> decrypted_back = crypt.decrypt_and_verify(encrypted_data)
|
||||
# =>
|
||||
TOKEN = 'Bearer WA9UvDmzR9UcE5rLqpWravPQtdS8eDMAIynzGdSOTw==--9ZShwwij3qmLeuMJ--NE96w2PnfpfyIuuNzDJTGw=='.freeze
|
||||
BASE_URL = ENV['eis_billing_system_base_url']
|
||||
BASE_URL = ""
|
||||
if Rails.env.staging?
|
||||
BASE_URL = ENV['eis_billing_system_base_url_staging']
|
||||
else
|
||||
BASE_URL = ENV['eis_billing_system_base_url_dev']
|
||||
end
|
||||
INITIATOR = 'registry'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
module EisBilling
|
||||
class GetInvoiceNumber < EisBilling::Base
|
||||
def self.send_invoice
|
||||
base_request
|
||||
result = base_request
|
||||
|
||||
Rails.logger.info "---------->"
|
||||
Rails.logger.info result.body
|
||||
Rails.logger.info invoice_generator_url
|
||||
Rails.logger.info "---------->"
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -15,6 +22,9 @@ module EisBilling
|
|||
'Accept' => TOKEN
|
||||
}
|
||||
|
||||
http.use_ssl = true
|
||||
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
|
||||
http.post(invoice_generator_url, nil, headers)
|
||||
end
|
||||
|
||||
|
|
|
@ -235,4 +235,6 @@ registry_demo_accredited_users_url: 'http://registry.test/api/v1/accreditation_c
|
|||
a_and_aaaa_validation_timeout: '1'
|
||||
nameserver_validation_timeout: '1'
|
||||
|
||||
eis_billing_system_base_url: 'http://eis_billing_system:3000'
|
||||
eis_billing_system_base_url_dev: 'http://eis_billing_system:3000'
|
||||
eis_billing_system_base_url_staging: 'https://st-billing.infra.tld.ee'
|
||||
eis_token:
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
TOKEN = ENV['eis_token']
|
||||
BASE_URL = ENV['eis_billing_system_base_url']
|
||||
BASE_URL = ""
|
||||
if Rails.env.staging?
|
||||
BASE_URL = ENV['eis_billing_system_base_url_staging']
|
||||
else
|
||||
BASE_URL = ENV['eis_billing_system_base_url_dev']
|
||||
end
|
||||
|
||||
namespace :eis_billing do
|
||||
desc 'One time task to export invoice data to billing system'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue