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
- #acknowledge(authcode = nil) ⇒ Object
- #authorization_number ⇒ Object
- #card_last_four ⇒ Object
- #card_type ⇒ Object
- #currency ⇒ Object
- #customer_address ⇒ Object
- #customer_city ⇒ Object
- #customer_comment ⇒ Object
- #customer_country ⇒ Object
- #customer_email ⇒ Object
- #customer_name ⇒ Object
- #customer_zip ⇒ Object
- #gross ⇒ Object
- #item_id ⇒ Object (also: #order)
- #password ⇒ Object
- #received_at ⇒ Object
- #status ⇒ Object
- #success? ⇒ Boolean (also: #complete?)
- #test? ⇒ Boolean
- #transaction_id ⇒ Object
- #transaction_number ⇒ Object
Instance Method Details
#acknowledge(authcode = nil) ⇒ Object
90 91 92 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 90 def acknowledge(authcode = nil) password ? Digest::MD5.hexdigest("#{password}#{order}") == params['RafraenUndirskriftSvar'] : true end |
#authorization_number ⇒ Object
50 51 52 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 50 def params['Heimildarnumer'] end |
#card_last_four ⇒ Object
46 47 48 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 46 def card_last_four params['KortnumerSidustu'] end |
#card_type ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 42 def card_type params['Kortategund'] end |
#currency ⇒ Object
26 27 28 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 26 def currency nil end |
#customer_address ⇒ Object
62 63 64 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 62 def customer_address params['Heimilisfang'] end |
#customer_city ⇒ Object
70 71 72 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 70 def customer_city params['Stadur'] end |
#customer_comment ⇒ Object
82 83 84 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 82 def customer_comment params['Athugasemdir'] end |
#customer_country ⇒ Object
74 75 76 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 74 def customer_country params['Land'] end |
#customer_email ⇒ Object
78 79 80 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 78 def customer_email params['Tolvupostfang'] end |
#customer_name ⇒ Object
58 59 60 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 58 def customer_name params['Nafn'] end |
#customer_zip ⇒ Object
66 67 68 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 66 def customer_zip params['Postnumer'] end |
#gross ⇒ Object
38 39 40 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 38 def gross "%0.2f" % params['Upphaed'].to_s.sub(',', '.') end |
#item_id ⇒ Object Also known as: order
17 18 19 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 17 def item_id params['Tilvisunarnumer'] end |
#password ⇒ Object
86 87 88 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 86 def password @options[:credential2] end |
#received_at ⇒ Object
34 35 36 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 34 def received_at Time.parse(params['Dagsetning'].to_s) end |
#status ⇒ Object
30 31 32 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 30 def status "Completed" if acknowledge end |
#success? ⇒ Boolean Also known as: complete?
8 9 10 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 8 def success? status == 'Completed' end |
#test? ⇒ Boolean
13 14 15 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 13 def test? @options[:test] end |
#transaction_id ⇒ Object
22 23 24 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 22 def transaction_id params['VefverslunSalaID'] end |
#transaction_number ⇒ Object
54 55 56 |
# File 'lib/active_merchant/billing/integrations/valitor/response_fields.rb', line 54 def transaction_number params['Faerslunumer'] end |