Class: Datatrans::XML::Transaction::AuthorizeResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/datatrans/xml/transaction/authorize.rb

Instance Attribute Summary

Attributes inherited from Response

#datatrans, #params

Instance Method Summary collapse

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from Datatrans::XML::Transaction::Response

Instance Method Details

#authorization_codeObject



55
56
57
58
59
# File 'lib/datatrans/xml/transaction/authorize.rb', line 55

def authorization_code
  params_root_node["response"]["authorizationCode"]
rescue
  nil
end

#creditcard_aliasObject



67
68
69
70
71
# File 'lib/datatrans/xml/transaction/authorize.rb', line 67

def creditcard_alias
  params_root_node["request"]["aliasCC"]
rescue
  nil
end

#error_codeObject



73
74
75
76
77
# File 'lib/datatrans/xml/transaction/authorize.rb', line 73

def error_code
  params_root_node["error"]["errorCode"]
rescue
  nil
end

#error_detailObject



85
86
87
88
89
# File 'lib/datatrans/xml/transaction/authorize.rb', line 85

def error_detail
  params_root_node["error"]["errorDetail"]
rescue
  nil
end

#error_messageObject



79
80
81
82
83
# File 'lib/datatrans/xml/transaction/authorize.rb', line 79

def error_message
  params_root_node["error"]["errorMessage"]
rescue
  nil
end

#masked_ccObject



61
62
63
64
65
# File 'lib/datatrans/xml/transaction/authorize.rb', line 61

def masked_cc
  params_root_node["response"]["maskedCC"]
rescue
  nil
end

#reference_numberObject



49
50
51
52
53
# File 'lib/datatrans/xml/transaction/authorize.rb', line 49

def reference_number
  params_root_node["refno"]
rescue
  nil
end

#response_codeObject



31
32
33
34
35
# File 'lib/datatrans/xml/transaction/authorize.rb', line 31

def response_code
  params_root_node["response"]["responseCode"]
rescue
  nil
end

#response_messageObject



37
38
39
40
41
# File 'lib/datatrans/xml/transaction/authorize.rb', line 37

def response_message
  params_root_node["response"]["responseMessage"]
rescue
  nil
end

#successful?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/datatrans/xml/transaction/authorize.rb', line 27

def successful?
  response_code == "01" && response_message == "Authorized"
end

#transaction_idObject



43
44
45
46
47
# File 'lib/datatrans/xml/transaction/authorize.rb', line 43

def transaction_id
  params_root_node["response"]["uppTransactionId"]
rescue
  nil
end