module OffsitePayments::Integrations::Valitor::ResponseFields
Public Instance Methods
acknowledge(authcode = nil)
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 186 def acknowledge(authcode = nil) password ? Digest::MD5.hexdigest("#{password}#{order}") == params['RafraenUndirskriftSvar'] : true end
card_last_four()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 142 def card_last_four params['KortnumerSidustu'] end
card_type()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 138 def card_type params['Kortategund'] end
currency()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 122 def currency nil end
customer_address()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 158 def customer_address params['Heimilisfang'] end
customer_city()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 166 def customer_city params['Stadur'] end
customer_comment()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 178 def customer_comment params['Athugasemdir'] end
customer_country()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 170 def customer_country params['Land'] end
customer_email()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 174 def customer_email params['Tolvupostfang'] end
customer_name()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 154 def customer_name params['Nafn'] end
customer_zip()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 162 def customer_zip params['Postnumer'] end
gross()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 134 def gross "%0.2f" % params['Upphaed'].to_s.sub(',', '.') end
item_id()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 113 def item_id params['Tilvisunarnumer'] end
Also aliased as: order
password()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 182 def password @options[:credential2] end
received_at()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 130 def received_at Time.parse(params['Dagsetning'].to_s) end
status()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 126 def status "Completed" if acknowledge end
success?()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 104 def success? status == 'Completed' end
Also aliased as: complete?
test?()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 109 def test? @options[:test] end
transaction_id()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 118 def transaction_id params['VefverslunSalaID'] end
transaction_number()
click to toggle source
# File lib/offsite_payments/integrations/valitor.rb, line 150 def transaction_number params['Faerslunumer'] end