Sha256: 65901c34cafb2b1e941505f92635020bd57743ff2d467eeef1b985e467eee0af

Contents?: true

Size: 980 Bytes

Versions: 29

Compression:

Stored size: 980 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      # Platron API: www.platron.ru/PlatronAPI.pdf‎
      module Platron
        autoload :Helper, File.dirname(__FILE__) + '/platron/helper.rb'
        autoload :Notification, File.dirname(__FILE__) + '/platron/notification.rb'
        autoload :Common, File.dirname(__FILE__) + '/platron/common.rb'

        mattr_accessor :service_url
        self.service_url = 'https://www.platron.ru/payment.php'

        def self.notification(raw_post)
          Notification.new(raw_post)
        end

        def self.generate_signature_string(params, path, secret)
          sorted_params = params.sort_by{|k,v| k.to_s}.collect{|k,v| v}
          [path, sorted_params, secret].flatten.compact.join(';')
        end

        def self.generate_signature(params, path, secret)
          Digest::MD5.hexdigest(generate_signature_string(params, path, secret))
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

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