Module: ActiveMerchant::Billing::Integrations::Robokassa::Common
- Included in:
- Helper, Notification
- Defined in:
- lib/active_merchant/billing/integrations/robokassa/common.rb
Instance Method Summary collapse
Instance Method Details
#generate_signature ⇒ Object
12 13 14 |
# File 'lib/active_merchant/billing/integrations/robokassa/common.rb', line 12 def generate_signature Digest::MD5.hexdigest(generate_signature_string) end |
#generate_signature_string ⇒ Object
6 7 8 9 10 |
# File 'lib/active_merchant/billing/integrations/robokassa/common.rb', line 6 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 |