Module: Opay::Configuration::ClassMethods

Defined in:
lib/opay/configuration.rb

Instance Method Summary collapse

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



24
25
26
# File 'lib/opay/configuration.rb', line 24

def configure
  yield self
end

#reset_configObject

Sets configuration back to default



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/opay/configuration.rb', line 29

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
    config.process_payments_localy = false
  end
end