Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::Integrations::Quickpay::Notification

Constants

MD5_CHECK_FIELDS

Public Instance Methods

acknowledge() click to toggle source

Quickpay doesn't do acknowledgements of callback notifications Instead it uses and MD5 hash of all parameters

# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 67
def acknowledge      
  generate_md5check == params['md5check']
end
complete?() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 8
def complete?
  status == '000'
end
currency() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 40
def currency
  params['currency']
end
generate_md5check() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 61
def generate_md5check
  Digest::MD5.hexdigest(generate_md5string)
end
generate_md5string() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 57
def generate_md5string
  MD5_CHECK_FIELDS.map { |key| params[key.to_s] } * "" + @options[:credential2]
end
gross() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 24
def gross
  "%.2f" % (gross_cents / 100.0)
end
gross_cents() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 28
def gross_cents
  params['amount'].to_i
end
item_id() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 12
def item_id
  params['ordernumber']
end
received_at() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 20
def received_at
  Time.parse("20#{params['time']}")
end
status() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 36
def status
  params['qpstat']
end
test?() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 32
def test?
  params['testmode'] == 'Yes'
end
transaction_id() click to toggle source
# File lib/active_merchant/billing/integrations/quickpay/notification.rb, line 16
def transaction_id
  params['transaction']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.