Class: OffsitePayments::Integrations::Dwolla::Notification

Inherits:
Notification
  • Object
show all
Includes:
Common
Defined in:
lib/offsite_payments/integrations/dwolla.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, #iso_currency, #valid_sender?

Constructor Details

#initialize(data, options) ⇒ Notification

Returns a new instance of Notification


66
67
68
# File 'lib/offsite_payments/integrations/dwolla.rb', line 66

def initialize(data, options)
  super
end

Instance Method Details

#acknowledge(authcode = nil) ⇒ Object


102
103
104
# File 'lib/offsite_payments/integrations/dwolla.rb', line 102

def acknowledge(authcode = nil)
  true
end

#complete?Boolean

Returns:

  • (Boolean)

70
71
72
# File 'lib/offsite_payments/integrations/dwolla.rb', line 70

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

#currencyObject


86
87
88
# File 'lib/offsite_payments/integrations/dwolla.rb', line 86

def currency
  "USD"
end

#errorObject


94
95
96
# File 'lib/offsite_payments/integrations/dwolla.rb', line 94

def error
  params['Error']
end

#grossObject


90
91
92
# File 'lib/offsite_payments/integrations/dwolla.rb', line 90

def gross
  params['Amount']
end

#item_idObject


82
83
84
# File 'lib/offsite_payments/integrations/dwolla.rb', line 82

def item_id
  params['OrderId']
end

#statusObject


74
75
76
# File 'lib/offsite_payments/integrations/dwolla.rb', line 74

def status
  params["Status"]
end

#test?Boolean

Returns:

  • (Boolean)

98
99
100
# File 'lib/offsite_payments/integrations/dwolla.rb', line 98

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

#transaction_idObject


78
79
80
# File 'lib/offsite_payments/integrations/dwolla.rb', line 78

def transaction_id
  params['TransactionId']
end