Class: VirtualMerchant::Logger
- Inherits:
-
Object
- Object
- VirtualMerchant::Logger
- Defined in:
- lib/virtual_merchant/logger.rb
Constant Summary collapse
- @@on =
false- @@log_xml =
false
Class Method Summary collapse
- .log_response(response) ⇒ Object
- .off! ⇒ Object
- .on! ⇒ Object
- .xml(msg, xml) ⇒ Object
- .xml_off! ⇒ Object
- .xml_on! ⇒ Object
Class Method Details
.log_response(response) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/virtual_merchant/logger.rb', line 11 def self.log_response(response) return unless @@on p "!!!!!!!!!!!!!!!!!!!!!!!! Credit Response !!!!!!!!!!!!!!!!!!!!!!!!!!!!" if response.result p "result " + response.result elsif response.error p "error " + response.error end p "result_message " + response. p "!!!!!!!!!!!!!!!!!!!!!!!! End Credit Response !!!!!!!!!!!!!!!!!!!!!!!!!!!!" end |
.off! ⇒ Object
7 |
# File 'lib/virtual_merchant/logger.rb', line 7 def self.off!() @@on = false end |
.on! ⇒ Object
6 |
# File 'lib/virtual_merchant/logger.rb', line 6 def self.on!() @@on = true end |
.xml(msg, xml) ⇒ Object
23 24 25 26 27 |
# File 'lib/virtual_merchant/logger.rb', line 23 def self.xml(msg, xml) return unless @@log_xml puts msg pp xml end |
.xml_off! ⇒ Object
9 |
# File 'lib/virtual_merchant/logger.rb', line 9 def self.xml_off!() @@log_xml = false end |
.xml_on! ⇒ Object
8 |
# File 'lib/virtual_merchant/logger.rb', line 8 def self.xml_on!() @@log_xml = true end |