Module: OffsitePayments::Integrations::Robokassa::Common
- Included in:
- Helper, Notification
- Defined in:
- lib/offsite_payments/integrations/robokassa.rb
Instance Method Summary collapse
Instance Method Details
#generate_signature ⇒ Object
47 48 49 |
# File 'lib/offsite_payments/integrations/robokassa.rb', line 47 def generate_signature Digest::MD5.hexdigest(generate_signature_string) end |
#generate_signature_string ⇒ Object
41 42 43 44 45 |
# File 'lib/offsite_payments/integrations/robokassa.rb', line 41 def generate_signature_string custom_param_keys = params.keys.select {|key| key =~ /^shp/}.sort custom_params = custom_param_keys.map {|key| "#{key}=#{params[key]}"} [main_params, secret, custom_params.compact].flatten.join(':') end |