Class: DragonPay::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/dragon_pay/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
# File 'lib/dragon_pay/configuration.rb', line 5

def initialize
  @test_mode   = true
  @merchant_id = 'APPSOURCE'
  @secret_key  = 'Jy$mV8qL'
  @currency    = 'PHP'
end

Instance Attribute Details

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/dragon_pay/configuration.rb', line 3

def currency
  @currency
end

#merchant_idObject

Returns the value of attribute merchant_id.



3
4
5
# File 'lib/dragon_pay/configuration.rb', line 3

def merchant_id
  @merchant_id
end

#secret_keyObject

Returns the value of attribute secret_key.



3
4
5
# File 'lib/dragon_pay/configuration.rb', line 3

def secret_key
  @secret_key
end

#test_modeObject

Returns the value of attribute test_mode.



3
4
5
# File 'lib/dragon_pay/configuration.rb', line 3

def test_mode
  @test_mode
end

Instance Method Details

#payment_switch_domainObject



12
13
14
# File 'lib/dragon_pay/configuration.rb', line 12

def payment_switch_domain
  test_mode ? 'http://test.dragonpay.ph' : 'https://secure.dragonpay.ph'
end