Class: Xpay::Transaction
- Inherits:
-
Object
- Object
- Xpay::Transaction
- Defined in:
- lib/xpay/transaction.rb
Overview
The transaction class is the parent class of all Transactions be it Payment, Refund or Paypal etc. it provides underlying methods which all transactions have in common It should not be instantiated by itself
Direct Known Subclasses
Instance Attribute Summary collapse
-
#request_xml ⇒ Object
Returns the value of attribute request_xml.
-
#response_block ⇒ Object
readonly
Returns the value of attribute response_block.
-
#response_xml ⇒ Object
readonly
Returns the value of attribute response_xml.
-
#three_secure ⇒ Object
readonly
Returns the value of attribute three_secure.
Instance Method Summary collapse
Instance Attribute Details
#request_xml ⇒ Object
Returns the value of attribute request_xml.
10 11 12 |
# File 'lib/xpay/transaction.rb', line 10 def request_xml @request_xml end |
#response_block ⇒ Object (readonly)
Returns the value of attribute response_block.
11 12 13 |
# File 'lib/xpay/transaction.rb', line 11 def response_block @response_block end |
#response_xml ⇒ Object
Returns the value of attribute response_xml.
11 12 13 |
# File 'lib/xpay/transaction.rb', line 11 def response_xml @response_xml end |
#three_secure ⇒ Object (readonly)
Returns the value of attribute three_secure.
11 12 13 |
# File 'lib/xpay/transaction.rb', line 11 def three_secure @three_secure end |
Instance Method Details
#request_method ⇒ Object
14 15 16 |
# File 'lib/xpay/transaction.rb', line 14 def request_method @request_method ||= REXML::XPath.first(@request_xml, "//Request").attributes["Type"] end |
#response_code ⇒ Object
18 19 20 |
# File 'lib/xpay/transaction.rb', line 18 def response_code REXML::XPath.first(@response_xml, "//Result").text.to_i rescue nil end |