Class: OffsitePayments::Integrations::Maksuturva::Notification
- Inherits:
-
Notification
- Object
- Notification
- OffsitePayments::Integrations::Maksuturva::Notification
show all
- Defined in:
- lib/offsite_payments/integrations/maksuturva.rb
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
#amount, #empty!, #gross_cents, #initialize, #iso_currency, #test?, #valid_sender?
Instance Method Details
#acknowledge(authcode = nil) ⇒ Object
216
217
218
219
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 216
def acknowledge(authcode = nil)
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
192
193
194
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 192
def complete?
true
end
|
#currency ⇒ Object
208
209
210
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 208
def currency
params["pmt_currency"]
end
|
#gross ⇒ Object
204
205
206
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 204
def gross
params["pmt_amount"]
end
|
#security_key ⇒ Object
200
201
202
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 200
def security_key
params["pmt_hash"]
end
|
#status ⇒ Object
212
213
214
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 212
def status
"PAID"
end
|
#transaction_id ⇒ Object
196
197
198
|
# File 'lib/offsite_payments/integrations/maksuturva.rb', line 196
def transaction_id
params["pmt_id"]
end
|