Class: PaytechGem::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/paytech_gem.rb', line 11

def initialize
  # Set default values or leave them nil
  @api_key = ENV['PAYTECH_API_KEY']
  @api_secret = ENV['PAYTECH_SECRET_KEY']
  @currency = 'XOF'
  @command_name = 'Depot compte Nessi via PayTech'
  @env = ENV['PAYTECH_ENV']
  @ipn_url = 'https://www.yapsy.sn/api/v1/paytech/ipn'
  @success_url = 'https://www.yapsy.sn/paytech/success'
  @cancel_url = 'https://www.yapsy.sn/paytech/cancel'
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def api_key
  @api_key
end

#api_secretObject

Returns the value of attribute api_secret.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def api_secret
  @api_secret
end

#cancel_urlObject

Returns the value of attribute cancel_url.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def cancel_url
  @cancel_url
end

#command_nameObject

Returns the value of attribute command_name.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def command_name
  @command_name
end

#currencyObject

Returns the value of attribute currency.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def currency
  @currency
end

#envObject

Returns the value of attribute env.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def env
  @env
end

#ipn_urlObject

Returns the value of attribute ipn_url.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def ipn_url
  @ipn_url
end

#success_urlObject

Returns the value of attribute success_url.



8
9
10
# File 'lib/paytech_gem.rb', line 8

def success_url
  @success_url
end