mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue