class OffsitePayments::Integrations::Robokassa::Notification
Public Class Methods
recognizes?(params)
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 98 def self.recognizes?(params) params.has_key?('InvId') && params.has_key?('OutSum') end
Public Instance Methods
acknowledge(authcode = nil)
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 134 def acknowledge(authcode = nil) security_key == generate_signature end
amount()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 106 def amount BigDecimal.new(gross) end
complete?()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 102 def complete? true end
gross()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 118 def gross params['OutSum'] end
item_id()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 110 def item_id params['InvId'] end
main_params()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 130 def main_params [gross, item_id] end
secret()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 126 def secret @options[:secret] end
security_key()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 114 def security_key params[OffsitePayments::Integrations::Robokassa.signature_parameter_name].to_s.downcase end
status()
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 122 def status 'success' end
success_response(*args)
click to toggle source
# File lib/offsite_payments/integrations/robokassa.rb, line 138 def success_response(*args) "OK#{item_id}" end