Class: ActiveMerchant::Billing::Integrations::Paxum::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Paxum::Notification
show all
- Includes:
- Common
- Defined in:
- lib/active_merchant/billing/integrations/paxum/notification.rb
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, #status, #test?, #valid_sender?
Constructor Details
#initialize(post, options = {}) ⇒ Notification
Returns a new instance of Notification.
8
9
10
11
12
|
# File 'lib/active_merchant/billing/integrations/paxum/notification.rb', line 8
def initialize(post, options = {})
@raw_post = post.dup
post.slice!(0)
super
end
|
Class Method Details
.recognizes?(params) ⇒ Boolean
14
15
16
|
# File 'lib/active_merchant/billing/integrations/paxum/notification.rb', line 14
def self.recognizes?(params)
(params.has_key?('transaction_item_id') && params.has_key?('transaction_amount'))
end
|
Instance Method Details
#acknowledge ⇒ Object
26
27
28
|
# File 'lib/active_merchant/billing/integrations/paxum/notification.rb', line 26
def acknowledge
(security_key == generate_signature)
end
|
#secret ⇒ Object
22
23
24
|
# File 'lib/active_merchant/billing/integrations/paxum/notification.rb', line 22
def secret
@options[:secret]
end
|
#security_key ⇒ Object
18
19
20
|
# File 'lib/active_merchant/billing/integrations/paxum/notification.rb', line 18
def security_key
params["key"]
end
|