Class: ActiveMerchant::Billing::FirstData::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/first_data/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response_parameters) ⇒ Response

Returns a new instance of Response.



6
7
8
# File 'lib/active_merchant/billing/first_data/response.rb', line 6

def initialize response_parameters
  self.parameters=response_parameters
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/active_merchant/billing/first_data/response.rb', line 10

def ok?
  result == "OK"
end

#parametersObject



46
47
48
# File 'lib/active_merchant/billing/first_data/response.rb', line 46

def parameters
  @parameters
end

#recc_pmnt_expiryObject



34
35
36
# File 'lib/active_merchant/billing/first_data/response.rb', line 34

def recc_pmnt_expiry
  @parameters[:recc_pmnt_expiry]
end

#recc_pmnt_idObject



30
31
32
# File 'lib/active_merchant/billing/first_data/response.rb', line 30

def recc_pmnt_id
  @parameters[:recc_pmnt_id]
end

#recurring?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_merchant/billing/first_data/response.rb', line 14

def recurring?
  recc_pmnt_id.present? && recc_pmnt_expiry.present?
end

#resultObject



18
19
20
# File 'lib/active_merchant/billing/first_data/response.rb', line 18

def result
  @parameters[:result]
end

#result_codeObject



26
27
28
# File 'lib/active_merchant/billing/first_data/response.rb', line 26

def result_code
  @parameters[:result_code]
end

#result_textObject



42
43
44
# File 'lib/active_merchant/billing/first_data/response.rb', line 42

def result_text
  FDL_RESPONSE_CODES["c#{result_code}".to_sym]
end

#three_dee_secureObject



38
39
40
# File 'lib/active_merchant/billing/first_data/response.rb', line 38

def three_dee_secure
  @parameters[:'3dsecure']
end

#transaction_idObject



22
23
24
# File 'lib/active_merchant/billing/first_data/response.rb', line 22

def transaction_id
  @parameters[:transaction_id]
end