Class: ActiveMerchant::Billing::Integrations::Maksuturva::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::Maksuturva::Notification
show all
- Defined in:
- lib/active_merchant/billing/integrations/maksuturva/notification.rb
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
#amount, #empty!, #gross_cents, #initialize, #test?, #valid_sender?
Instance Method Details
#acknowledge(authcode) ⇒ Object
32
33
34
35
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 32
def acknowledge(authcode)
return_authcode = [params["pmt_action"], params["pmt_version"], params["pmt_id"], params["pmt_reference"], params["pmt_amount"], params["pmt_currency"], params["pmt_sellercosts"], params["pmt_paymentmethod"], params["pmt_escrow"], authcode].join("&")
(Digest::MD5.hexdigest(return_authcode + "&").upcase == params["pmt_hash"])
end
|
#complete? ⇒ Boolean
8
9
10
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 8
def complete?
true
end
|
#currency ⇒ Object
24
25
26
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 24
def currency
params["pmt_currency"]
end
|
#gross ⇒ Object
20
21
22
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 20
def gross
params["pmt_amount"]
end
|
#security_key ⇒ Object
16
17
18
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 16
def security_key
params["pmt_hash"]
end
|
#status ⇒ Object
28
29
30
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 28
def status
"PAID"
end
|
#transaction_id ⇒ Object
12
13
14
|
# File 'lib/active_merchant/billing/integrations/maksuturva/notification.rb', line 12
def transaction_id
params["pmt_id"]
end
|