Class: Laundry::PaymentsGateway::TransactionDriver
- Inherits:
-
MerchantAuthenticatableDriver
- Object
- MerchantAuthenticatableDriver
- Laundry::PaymentsGateway::TransactionDriver
- Defined in:
- lib/laundry/payments_gateway/drivers/transaction_driver.rb
Instance Attribute Summary
Attributes inherited from MerchantAuthenticatableDriver
Class Method Summary collapse
-
.wsdl ⇒ Object
Setup WSDL.
Instance Method Summary collapse
Methods inherited from MerchantAuthenticatableDriver
#default_body, #initialize, prettifiable_fields, #setup_client!, uglify_hash
Methods included from SOAPModel
Constructor Details
This class inherits a constructor from Laundry::PaymentsGateway::MerchantAuthenticatableDriver
Class Method Details
.wsdl ⇒ Object
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 |