Class: ActiveMerchant::Billing::Integrations::Dwolla::Notification

Inherits:
Notification
  • Object
show all
Includes:
Common
Defined in:
lib/active_merchant/billing/integrations/dwolla/notification.rb

Instance Attribute Summary

Attributes inherited from Notification

#params, #raw

Instance Method Summary collapse

Methods included from Common

#verify_signature

Methods inherited from Notification

#amount, #empty!, #gross_cents, #valid_sender?

Constructor Details

#initialize(data, options) ⇒ Notification

Returns a new instance of Notification.



11
12
13
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 11

def initialize(data, options)
  super
end

Instance Method Details

#acknowledge(authcode = nil) ⇒ Object



47
48
49
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 47

def acknowledge(authcode = nil)
  true
end

#complete?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 15

def complete?
  (status == "Completed")
end

#currencyObject



31
32
33
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 31

def currency
  "USD"
end

#errorObject



39
40
41
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 39

def error
  params['Error']
end

#grossObject



35
36
37
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 35

def gross
  params['Amount']
end

#item_idObject



27
28
29
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 27

def item_id
  params['OrderId']
end

#statusObject



19
20
21
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 19

def status
  params["Status"]
end

#test?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 43

def test?
  params['TestMode'] != "false"
end

#transaction_idObject



23
24
25
# File 'lib/active_merchant/billing/integrations/dwolla/notification.rb', line 23

def transaction_id
  params['TransactionId']
end