Create Requests :
To create a new ISO
request for a Transformer:
- Select the
ISO
type Transformer and click "New Request" on hover to create a request. - Navigate to the created request & select it to configure.
- User will see three tabs
L1, L2 & L3
.L1
represents dynamically generated transformer request's endpoint, InL2
we provide request & response rules scripts and inL3
we provide client request & response body for client's url.
- Client url can be any valid url which will return the expected response.
- Now in
L1
provide necessary datamethod, body
.
- Port value auto assign to requests when ISO type Transformer starts.
- Transformer rules scripts can be applied using
L2
tab. - In
L3
provide client url, content type, method, body etc.
- If client content type is ISO then it will need endpoint, port & spec file.
- Save the configured request and Start the Transformer.
Execute ISO Request
To test a ISO Transformer request:
- Copy the URL of the desired ISO request within the Transformer.
- Go to the API module , select ISO tab and Paste the Transformer request's endpoint & port.
- Provide any required data (body, method, headers etc).
- Send the request.
- Compare the actual response to the expected response.
- Make sure to start the Transformer after simulating a request.
Example :
We will simulate an Payment_processing
request in ISO type Processing
collection. This request will take ISO type data as L1 & XML type data as L3 In which user will provide JSON payload and internally this request will execute client request with ISO payload data :
L1 request & response body :-
// L1 Request Body
<isomsg>
<header/>
<field id="0" value="0200"/>
<field id="2" value="1234567890123456789"/>
<field id="3" value="000000"/>
<field id="4" value="000000001000"/>
<field id="7" value="0612081234"/>
<field id="11" value="123456"/>
<field id="12" value="121234"/>
<field id="13" value="0608"/>
<field id="41" value="12345678"/>
<field id="49" value="840"/>
</isomsg>
// L1 Response Body
<isomsg>
<header/>
<field id="0" value="0210"/>
<field id="2" value="1234567890123456789"/>
<field id="3" value="000000"/>
<field id="4" value="000000001000"/>
<field id="7" value="0612081234"/>
<field id="11" value="123456"/>
<field id="12" value="121234"/>
<field id="13" value="0608"/>
<field id="37" value="654321"/>
<field id="39" value="00"/>
<field id="41" value="12345678"/>
<field id="49" value="840"/>
</isomsg>
L3 request & response body :-
- These below bodies have been used to create L3 request.
- User can use these body and simulate an L3 ISO request using PruTAN's Hostbox module.-
- To know how to simulate requests in Hostbox please follow : Hostbox
// L3 Request Body
<Transaction>
<MTI>0200</MTI>
<PrimaryAccountNumber>1234567890123456</PrimaryAccountNumber>
<ProcessingCode>000000</ProcessingCode>
<TransactionAmount>1000</TransactionAmount>
<TransmissionDateTime>0612081234</TransmissionDateTime>
<SystemsTraceAuditNumber>123456</SystemsTraceAuditNumber>
<LocalTransactionTime>121234</LocalTransactionTime>
<LocalTransactionDate>0608</LocalTransactionDate>
<TerminalId>12345678</TerminalId>
<CurrencyCode>840</CurrencyCode>
</Transaction>
// L3 Response Body
<Transaction>
<MTI>0210</MTI>
<PrimaryAccountNumber>1234567890123456</PrimaryAccountNumber>
<ProcessingCode>000000</ProcessingCode>
<TransactionAmount>1000</TransactionAmount>
<TransmissionDateTime>0612081234</TransmissionDateTime>
<SystemsTraceAuditNumber>123456</SystemsTraceAuditNumber>
<LocalTransactionTime>121234</LocalTransactionTime>
<LocalTransactionDate>0608</LocalTransactionDate>
<TerminalId>12345678</TerminalId>
<CurrencyCode>840</CurrencyCode>
<ResponseCode>00</ResponseCode>
<ApprovalCode>ABC123</ApprovalCode>
<Balance>9000</Balance>
</Transaction>
- Now follow above steps and execute this above simulated request in API module. User will get simulated response body as response after request execution.
- For a detailed analysis of Transformer requests, users can check the Transformer's Analytics submenu.
- Repeat these steps for different scenarios within the Transformer to thoroughly test your ISO APIs efficiently.
Table of Contents