Class: OffsitePayments::Integrations::Paxum::Notification
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Common
#generate_signature, #generate_signature_string
#amount, #empty!, #gross, #gross_cents, #iso_currency, #status, #test?, #valid_sender?
Constructor Details
#initialize(post, options = {}) ⇒ Notification
Returns a new instance of Notification.
90
91
92
93
94
|
# File 'lib/offsite_payments/integrations/paxum.rb', line 90
def initialize(post, options = {})
@raw_post = post.dup
post.slice!(0)
super
end
|
Class Method Details
.recognizes?(params) ⇒ Boolean
96
97
98
|
# File 'lib/offsite_payments/integrations/paxum.rb', line 96
def self.recognizes?(params)
(params.has_key?('transaction_item_id') && params.has_key?('transaction_amount'))
end
|
Instance Method Details
#acknowledge(authcode = nil) ⇒ Object
108
109
110
|
# File 'lib/offsite_payments/integrations/paxum.rb', line 108
def acknowledge(authcode = nil)
(security_key == generate_signature)
end
|
#secret ⇒ Object
104
105
106
|
# File 'lib/offsite_payments/integrations/paxum.rb', line 104
def secret
@options[:secret]
end
|
#security_key ⇒ Object
100
101
102
|
# File 'lib/offsite_payments/integrations/paxum.rb', line 100
def security_key
params["key"]
end
|