Sha256: 6f809d385f72d1ce320c3bb06f3c01e1eaeb158333030f2f05110179d13c320a

Contents?: true

Size: 573 Bytes

Versions: 36

Compression:

Stored size: 573 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Robokassa
        module Common
          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

          def generate_signature
            Digest::MD5.hexdigest(generate_signature_string)
          end
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
tanga_activemerchant-1.38.0.5 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.38.0.4 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.38.0.3 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.38.0.2 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.38.0.1 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.38.0 lib/active_merchant/billing/integrations/robokassa/common.rb
tanga_activemerchant-1.37.0 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.43.3 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.43.1 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.43.0 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.9 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.8 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.7 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.6 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.5 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.4 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.3 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.2 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.1 lib/active_merchant/billing/integrations/robokassa/common.rb
activemerchant-1.42.0 lib/active_merchant/billing/integrations/robokassa/common.rb