Sha256: 620fa2c74ae5ebce380c9d65cd9b65b6014d401b711fda49b2de3faf092a6b29

Contents?: true

Size: 827 Bytes

Versions: 13

Compression:

Stored size: 827 Bytes

Contents

module Opay

  module Configuration
    extend ActiveSupport::Concern
    include ActiveSupport::Configurable

    included do
      config_accessor :provider

      # payu configuration
      config_accessor :pos_id
      config_accessor :pos_auth_key
      config_accessor :key1
      config_accessor :key2

      config_accessor :test_mode

      reset_config
    end

    module ClassMethods

      def configure
        yield self
      end

      # Sets configuration back to default
      def reset_config
        configure do |config|
          config.provider = :payu

          # payu configuration
          config.pos_id = 999
          config.pos_auth_key = 'pos_auth_key'
          config.key1 = 'key1'
          config.key2 = 'key2'

          config.test_mode = false
        end
      end

    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
opay-1.1.3 lib/opay/configuration.rb
opay-1.1.2 lib/opay/configuration.rb
opay-1.1.1 lib/opay/configuration.rb
opay-1.1.0 lib/opay/configuration.rb
opay-1.0.9 lib/opay/configuration.rb
opay-1.0.8 lib/opay/configuration.rb
opay-1.0.7 lib/opay/configuration.rb
opay-1.0.6 lib/opay/configuration.rb
opay-1.0.5 lib/opay/configuration.rb
opay-1.0.4 lib/opay/configuration.rb
opay-1.0.3 lib/opay/configuration.rb
opay-1.0.1 lib/opay/configuration.rb
opay-1.0.0 lib/opay/configuration.rb