class OffsitePayments::Integrations::Dwolla::Notification

Public Class Methods

new(data, options) click to toggle source
Calls superclass method OffsitePayments::Notification::new
# File lib/offsite_payments/integrations/dwolla.rb, line 66
def initialize(data, options)
  super
end

Public Instance Methods

acknowledge(authcode = nil) click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 102
def acknowledge(authcode = nil)
  true
end
complete?() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 70
def complete?
  (status == "Completed")
end
currency() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 86
def currency
  "USD"
end
error() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 94
def error
  params['Error']
end
gross() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 90
def gross
  params['Amount']
end
item_id() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 82
def item_id
  params['OrderId']
end
status() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 74
def status
  params["Status"]
end
test?() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 98
def test?
  params['TestMode'] != "false"
end
transaction_id() click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 78
def transaction_id
  params['TransactionId']
end

Private Instance Methods

parse(post) click to toggle source
# File lib/offsite_payments/integrations/dwolla.rb, line 108
def parse(post)
  @raw = post.to_s
  json_post = JSON.parse(post)
  verify_signature(json_post['CheckoutId'], json_post['Amount'], json_post['Signature'], @options[:credential3])

  params.merge!(json_post)
end