Class: PayLane::Gateway
- Inherits:
-
Object
- Object
- PayLane::Gateway
- Defined in:
- lib/paylane/gateway.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(login, password) ⇒ Gateway
constructor
A new instance of Gateway.
- #wsdl_location ⇒ Object
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(login, password) @login = login @password = password end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/paylane/gateway.rb', line 3 def client @client end |
Instance Method Details
#connect ⇒ Object
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_location ⇒ Object
17 18 19 |
# File 'lib/paylane/gateway.rb', line 17 def wsdl_location 'https://direct.paylane.com/wsdl/production/Direct.wsdl' end |