Class: BreadMachine::SecureTrading::St3dAuthResponse
- Inherits:
-
XpayResponse
- Object
- XpayResponse
- BreadMachine::SecureTrading::St3dAuthResponse
- Defined in:
- lib/breadmachine/secure_trading/st_3d_auth_response.rb
Overview
A response object which tells us what happened with a 3-D Secure AUTH request.
Instance Method Summary collapse
- #declined? ⇒ Boolean
-
#successful? ⇒ Boolean
Returns true if the AUTH request was successful, i.e.
-
#transaction_reference ⇒ Object
A unique identifier for this AUTH transaction.
- #transaction_verifier ⇒ Object
Methods inherited from XpayResponse
#error?, #initialize, #message, #result
Constructor Details
This class inherits a constructor from BreadMachine::SecureTrading::XpayResponse
Instance Method Details
#declined? ⇒ Boolean
16 17 18 |
# File 'lib/breadmachine/secure_trading/st_3d_auth_response.rb', line 16 def declined? @xml.xpath('//OperationResponse/Result').text == "2" end |
#successful? ⇒ Boolean
Returns true if the AUTH request was successful, i.e. if the funds were successfully reserved.
12 13 14 |
# File 'lib/breadmachine/secure_trading/st_3d_auth_response.rb', line 12 def successful? @xml.xpath('//OperationResponse/Result').text == "1" end |
#transaction_reference ⇒ Object
A unique identifier for this AUTH transaction.
22 23 24 |
# File 'lib/breadmachine/secure_trading/st_3d_auth_response.rb', line 22 def transaction_reference @xml.xpath('//OperationResponse/TransactionReference').text end |
#transaction_verifier ⇒ Object
26 27 28 |
# File 'lib/breadmachine/secure_trading/st_3d_auth_response.rb', line 26 def transaction_verifier @xml.xpath('//OperationResponse/TransactionVerifier').text end |