Sha256: de89ecf83709aa91cbf1f69d2923f2cfd6e7d37e0ce3b2cf277238f56e619824

Contents?: true

Size: 654 Bytes

Versions: 48

Compression:

Stored size: 654 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Paxum
        module Common
          def generate_signature_string
            @raw_post.slice!(0) if @raw_post.starts_with?("&")
            @raw_post = CGI.unescape(@raw_post)
            @raw_post = "&#{@raw_post}" unless @raw_post.starts_with?("&")
            arr = @raw_post.split('&')
            arr.delete(arr.last)
            data = arr.join('&')

            (data + secret)
          end

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

Version data entries

48 entries across 48 versions & 4 rubygems

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