Module: ActiveMerchant::Billing::Integrations::Valitor::ResponseFields

Included in:
Notification, Return
Defined in:
lib/active_merchant/billing/integrations/valitor/response_fields.rb

Instance Method Summary collapse

Instance Method Details

#acknowledgeObject



81
82
83
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 81

def acknowledge
  password ? Digest::MD5.hexdigest("#{password}#{order}") == params['RafraenUndirskriftSvar'] : true
end

#authorization_numberObject



41
42
43
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 41

def authorization_number
  params['Heimildarnumer']
end

#card_last_fourObject



37
38
39
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 37

def card_last_four
  params['KortnumerSidustu']
end

#card_typeObject



33
34
35
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 33

def card_type
  params['Kortategund']
end

#customer_addressObject



53
54
55
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 53

def customer_address
  params['Heimilisfang']
end

#customer_cityObject



61
62
63
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 61

def customer_city
  params['Stadur']
end

#customer_commentObject



73
74
75
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 73

def customer_comment
  params['Athugasemdir']
end

#customer_countryObject



65
66
67
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 65

def customer_country
  params['Land']
end

#customer_emailObject



69
70
71
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 69

def customer_email
  params['Tolvupostfang']
end

#customer_nameObject



49
50
51
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 49

def customer_name
  params['Nafn']
end

#customer_zipObject



57
58
59
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 57

def customer_zip
  params['Postnumer']
end

#orderObject



17
18
19
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 17

def order
  params['Tilvisunarnumer']
end

#passwordObject



77
78
79
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 77

def password
  @options[:credential2]
end

#received_atObject



21
22
23
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 21

def received_at
  params['Dagsetning']
end

#statusObject



29
30
31
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 29

def status
  "OK"
end

#success?Boolean Also known as: complete?

Returns:

  • (Boolean)


8
9
10
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 8

def success?
  acknowledge
end

#test?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 13

def test?
  @options[:test]
end

#transaction_idObject



25
26
27
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 25

def transaction_id
  params['VefverslunSalaID']
end

#transaction_numberObject



45
46
47
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 45

def transaction_number
  params['Faerslunumer']
end