class OffsitePayments::Integrations::WebPay::Notification

Public Class Methods

recognizes?(params) click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 144
def self.recognizes?(params)
  params.has_key?('site_order_id') && params.has_key?('amount')
end

Public Instance Methods

acknowledge(authcode = nil) click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 176
def acknowledge(authcode = nil)
  (security_key == generate_signature(:notify))
end
amount() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 152
def amount
  Money.from_amount(BigDecimal(gross), currency)
end
complete?() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 148
def complete?
  true
end
currency() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 184
def currency
  params['currency_id']
end
gross() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 164
def gross
  params['amount']
end
item_id() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 156
def item_id
  params['site_order_id']
end
secret() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 172
def secret
  @options[:secret]
end
security_key() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 160
def security_key
  params[OffsitePayments::Integrations::WebPay.signature_parameter_name]
end
status() click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 168
def status
  'success'
end
success_response(*args) click to toggle source
# File lib/offsite_payments/integrations/web_pay.rb, line 180
def success_response(*args)
  {:nothing => true}
end