Method: Payu::Pos#initialize

Defined in:
lib/payu/pos.rb

#initialize(options) ⇒ Object

Creates new Pos instance

Parameters:

  • options (Hash)

    options hash



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/payu/pos.rb', line 16

def initialize(options)
  @pos_id        = options[:pos_id].to_i
  @pos_auth_key  = options[:pos_auth_key]
  @key1          = options[:key1]
  @key2          = options[:key2]
  @gateway_url   = options[:gateway_url] || 'www.platnosci.pl'
  @variant       = options[:variant] || 'default'
  @encoding      = options[:encoding] || 'UTF'
  @test_payment  = options.fetch(:test_payment, false)
  @add_signature = options.fetch(:add_signature, true)

  validate_options!
end