Module: Paya

Defined in:
lib/paya.rb,
lib/paya/base.rb,
lib/paya/version.rb,
lib/paya/certification.rb,
lib/paya/configuration.rb,
lib/paya/certification/ccd.rb,
lib/paya/certification/ppd.rb,
lib/paya/certification/tel.rb,
lib/paya/certification/web.rb,
lib/generators/paya/install_generator.rb,
lib/paya/ccd/guaranteed/debit_transaction.rb,
lib/paya/ppd/guaranteed/debit_transaction.rb,
lib/paya/tel/guaranteed/debit_transaction.rb,
lib/paya/web/guaranteed/debit_transaction.rb,
lib/paya/ccd/non_guaranteed/debit_transaction.rb,
lib/paya/ppd/non_guaranteed/debit_transaction.rb,
lib/paya/tel/non_guaranteed/debit_transaction.rb,
lib/paya/web/non_guaranteed/debit_transaction.rb,
lib/paya/ccd/guaranteed/credit_debit_transaction.rb,
lib/paya/ppd/guaranteed/credit_debit_transaction.rb,
lib/paya/tel/guaranteed/credit_debit_transaction.rb,
lib/paya/web/guaranteed/credit_debit_transaction.rb,
lib/paya/ccd/non_guaranteed/credit_debit_transaction.rb,
lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb,
lib/paya/tel/non_guaranteed/credit_debit_transaction.rb,
lib/paya/web/non_guaranteed/credit_debit_transaction.rb

Defined Under Namespace

Modules: Ccd, Certification, Generators, Ppd, Tel, Web Classes: Base, Configuration

Constant Summary collapse

CERTITICATION_API_END_POINT =
"https://demo.eftchecks.com/webservices/AuthGateway.asmx?WSDL"
API_END_POINT =
"https://getigateway.eftchecks.com/webservices/authgateway.asmx?WSDL"
PROCESS_SINGLE_CERTIFICATION_CHECK =
<<xml
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthGatewayHeader xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<UserName>&&&USER_NAME&&&</UserName>
<Password>&&&PASSWORD&&&</Password>
<TerminalID>&&&TERMINAL_ID&&&</TerminalID>
</AuthGatewayHeader>
</soap:Header>
<soap:Body>
<ProcessSingleCertificationCheck xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<DataPacket>
&&&DATA_PACKET&&&
</DataPacket>
</ProcessSingleCertificationCheck>
</soap:Body>
</soap:Envelope>
xml
PROCESS_SINGLE_CHECK =
<<xml
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthGatewayHeader xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<UserName>&&&USER_NAME&&&</UserName>
<Password>&&&PASSWORD&&&</Password>
<TerminalID>&&&TERMINAL_ID&&&</TerminalID>
</AuthGatewayHeader>
</soap:Header>
<soap:Body>
<ProcessSingleCheck xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<DataPacket>
&&&DATA_PACKET&&&
</DataPacket>
</ProcessSingleCheck>
</soap:Body>
</soap:Envelope>
xml
GET_ARCHIVED_RESPONSE =
<<xml
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthGatewayHeader xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<UserName>&&&USER_NAME&&&</UserName>
<Password>&&&PASSWORD&&&</Password>
<TerminalID>&&&TERMINAL_ID&&&</TerminalID>
</AuthGatewayHeader>
</soap:Header>
<soap:Body>
<GetArchivedResponse xmlns="http://tempuri.org/GETI.eMagnus.WebServices/AuthGateway">
<RequestId>
&&&REQUEST_ID&&&
</RequestId>
</GetArchivedResponse>
</soap:Body>
</soap:Envelope>
xml
VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



97
98
99
# File 'lib/paya.rb', line 97

def configuration
  @configuration
end

Class Method Details

.clientObject



99
100
101
# File 'lib/paya.rb', line 99

def client
  test_mode ? sandbox_client : live_client
end

.configure {|configuration| ... } ⇒ Object

Yields:



117
118
119
120
# File 'lib/paya.rb', line 117

def self.configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

.live_clientObject



103
104
105
# File 'lib/paya.rb', line 103

def live_client
  ::Savon.client(wsdl: Paya::API_END_POINT)
end

.sandbox_clientObject



107
108
109
# File 'lib/paya.rb', line 107

def sandbox_client
  ::Savon.client(wsdl: Paya::CERTITICATION_API_END_POINT)
end

.test_modeObject



111
112
113
# File 'lib/paya.rb', line 111

def test_mode
  !Paya.configuration.production
end