Class: PayLane::Gateway

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(login, password) ⇒ Gateway

Returns a new instance of Gateway.



5
6
7
8
# File 'lib/paylane/gateway.rb', line 5

def initialize(, password)
  @login = 
  @password = password
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/paylane/gateway.rb', line 3

def client
  @client
end

Instance Method Details

#connectObject



10
11
12
13
14
15
# File 'lib/paylane/gateway.rb', line 10

def connect
  @client = Savon.client do |wsdl, http|
    wsdl.document = wsdl_location
    http.auth.basic(@login, @password)
  end
end

#wsdl_locationObject



17
18
19
# File 'lib/paylane/gateway.rb', line 17

def wsdl_location
  'https://direct.paylane.com/wsdl/production/Direct.wsdl'
end