Sha256: 69ad58a97f5eb807570b72df29819377fcb74c5e2b9cf49a44de7300cfa82cc0

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

module Workarea
  module Storefront
    class KountController < Workarea::Storefront::ApplicationController
      def data_collector
        current_order.update_attributes(kount_session_id: kount_session_id)

        params = { merchant_id: Workarea::Kount.merchant_id, s: kount_session_id }

        redirect_to "#{Workarea::Kount.data_collector_url}logo.htm?#{params.to_query}", status: 302
      end

      private

        def kount_session_id
          @kount_session_id ||= "#{current_order.id}#{Time.now.to_i}R#{rand(10000..99999)}"
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-kount-3.3.1 app/controllers/workarea/storefront/kount_controller.rb
workarea-kount-3.3.0 app/controllers/workarea/storefront/kount_controller.rb