Class: BreadMachine::SecureTrading::St3dAuthResponse

Inherits:
XpayResponse
  • Object
show all
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

Methods inherited from XpayResponse

#error?, #initialize, #message, #result

Constructor Details

This class inherits a constructor from BreadMachine::SecureTrading::XpayResponse

Instance Method Details

#declined?Boolean

Returns:

  • (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.

Returns:

  • (Boolean)


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_referenceObject

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_verifierObject



26
27
28
# File 'lib/breadmachine/secure_trading/st_3d_auth_response.rb', line 26

def transaction_verifier
  @xml.xpath('//OperationResponse/TransactionVerifier').text
end