Class: Laundry::PaymentsGateway::TransactionDriver

Inherits:
MerchantAuthenticatableDriver show all
Defined in:
lib/laundry/payments_gateway/drivers/transaction_driver.rb

Instance Attribute Summary

Attributes inherited from MerchantAuthenticatableDriver

#merchant

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MerchantAuthenticatableDriver

#default_body, #initialize, prettifiable_fields, #setup_client!, uglify_hash

Methods included from SOAPModel

#actions, extended, #setup

Constructor Details

This class inherits a constructor from Laundry::PaymentsGateway::MerchantAuthenticatableDriver

Class Method Details

.wsdlObject

Setup WSDL


7
8
9
10
11
12
13
# File 'lib/laundry/payments_gateway/drivers/transaction_driver.rb', line 7

def self.wsdl
  if Laundry.sandboxed?
    'https://sandbox.paymentsgateway.net/WS/Transaction.wsdl'
  else
    'https://ws.paymentsgateway.net/Service/v1/Transaction.wsdl'
  end
end

Instance Method Details

#find(client_id, transaction_id) ⇒ Object


17
18
19
20
21
22
# File 'lib/laundry/payments_gateway/drivers/transaction_driver.rb', line 17

def find(client_id, transaction_id)
  r = get_transaction({'ClientID' => client_id, 'TransactionID' => transaction_id}) do
    http.headers["SOAPAction"] = "https://ws.paymentsgateway.net/v1/ITransactionService/getTransaction"
  end
  Transaction.from_response(r, self.merchant)
end