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
activemerchant-1.41.0 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.40.0 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.39.2 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.39.1 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.39.0 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.38.1 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.38.0 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.37.0 lib/active_merchant/billing/integrations/platron.rb
activemerchant-1.36.0 lib/active_merchant/billing/integrations/platron.rb