class OffsitePayments::Integrations::Maksuturva::Notification

Public Instance Methods

acknowledge(authcode = nil) click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 216
def acknowledge(authcode = nil)
  return_authcode = [params["pmt_action"], params["pmt_version"], params["pmt_id"], params["pmt_reference"], params["pmt_amount"], params["pmt_currency"], params["pmt_sellercosts"], params["pmt_paymentmethod"], params["pmt_escrow"], authcode].join("&")
  (Digest::MD5.hexdigest(return_authcode + "&").upcase == params["pmt_hash"])
end
complete?() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 192
def complete?
  true
end
currency() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 208
def currency
  params["pmt_currency"]
end
gross() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 204
def gross
  params["pmt_amount"]
end
security_key() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 200
def security_key
  params["pmt_hash"]
end
status() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 212
def status
  "PAID"
end
transaction_id() click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 196
def transaction_id
  params["pmt_id"]
end

Private Instance Methods

parse(post) click to toggle source
# File lib/offsite_payments/integrations/maksuturva.rb, line 223
def parse(post)
  post.each do |key, value|
    params[key] = value
  end
end