Test: Receive PayShap
In order to ensure that you have implemented the functionality to receive a PayShap payment correctly, you must be able to show the following:
- All the API operations implemented return the expected responses depending on the scenario (for example, the correct error response is returned in the case of an error scenario).
- You are able to resolve an inbound proxy request and correctly return a proxy resolution response.
- If you participate in payment authorisation during the clearing phase - you are able to receive a payment authorisation request and correctly return an authorisation response.
- You are able to receive a completion message after successful clearing.
Electrum provides a downloadable test pack with step-by-step instructions for performing each test, message flow diagrams, and a list of the expected outcomes for each test. There is space on the spreadsheet where you can record your test outcomes and any other comments or observations.
Each test scenario has an associated TestID that must be included in the request message. The testing platform's response to the simulated transaction request is based on the Test ID.
The testing procedure is shown below.
Step 1: Download the Test Pack
Download the test pack. The ‘Receive a Payshap Payment’ test pack can be found here.
Step 2: Perform the API Integration Tests
- Carry out each test case as specified in the test pack.
- To execute a given test case, use the process described below to initiate the test with the EPC Testing Platform. Each test case is identified with a unique test code that is used by the EPC Testing Platform to simulate a specific success or failure scenario. Populate the required fields of the
InitiationRequestas specified in the test pack. You will receive anInitiationResponse. - The Electrum Testing Platform then initiates an inbound flow, using normal EPC API operations, by sending you a simulated incoming
IdentifierDeterminationRequest. - The rest of the payment processing proceeds as you and Electrum send request and response messages to each other using the normal EPC API operations.
- The test pack specifies the expected outcome for each transaction.
- To execute a given test case, use the process described below to initiate the test with the EPC Testing Platform. Each test case is identified with a unique test code that is used by the EPC Testing Platform to simulate a specific success or failure scenario. Populate the required fields of the
- Record the outcome of each test in the space provided.
- To determine the outcome of a test case, use the process described below to request the test result from the EPC Testing Platform.
- Use the Pass/Fail column to record whether the expected outcome was achieved in each case. (Note: if you are testing a failure scenario, and the system correctly sends the expected error messages, then the test itself is a success and it is a Pass.)
- Make note of any interesting or relevant observations in the Comments/Notes column.
- Make special note of any specific problems or issues you experienced during testing in the Issue Log columns.
- Include any raw test data on the test pack spreadsheet.
Initiate a Test
You can test any of the scenarios described in the test pack by following these steps:
- Send an
InitiationRequestto the testing platform endpoint (that was provided during onboarding) conforming to the schema below:
A BankservAfrica-specific field requirement that associates this institution with a specific "domain"
- which is essentially a type of namespace.
This value should correspond to the the Corporate Client who is initiating the request's domain
The value for which the proxy resolution will be performed
The type of proxy, such as MBNO (mobile number) or CUST (custom). Initiations will default to MBNO if this is not set.
The payment amount in the denomination of the indicated currency, in the format '<major units>.<minor units> with the number of minor units (fractional digits) compliant with the number of decimal places published in ISO 4217.
The reference for the creditor
The following parameters must be included in the request:
- Test ID:
testId. - Domain – the
domainvalue agreed with your sponsor bank:initiationDetails.domain. - Proxy – any value that would lead to a your system returning either a successful or failed proxy resolution, depending on the test scenario:
initiationDetails.proxy.
Contact Electrum if you have not yet received the development environment endpoint that you will need in order to carry out testing.
- In a response to an
InitiationRequest, the testing platform returns anInitiationResponsemessage. This message includes the UETR of the transaction initiated to simulate the requested test. You can use the UETR to request the result of the test via a separate API call to the testing platform.
The UETR/UUID for the newly initiated transaction
You will receive a simulated IdentifierDeterminationRequest. Send a response to the development environment endpoint. The rest of the payment processing proceeds as you and Electrum send request and response messages to each other using the normal EPC API operations.
Request the Result of a Test From the Testing Platform
For the testing platform to accept messages that you send, you need to include the appropriate credentials (username and password). These credentials will be supplied to you during your onboarding process.
Use the testing API to request the outcome from the simulator by sending a message to the testing platform endpoint (that was provided during onboarding) conforming to the schema below.
- Send a
TestQueryrequest to the testing platform conforming to the schema below.
This a GET call to the /tests{uetr} endpoint.
The uetr field contains the UETR of the transaction that was processed during the test.
- In response to a
TestQueryrequest, the testing platform will return aQueryResponsemessage. This response will include a list of all state events generated by the EPC processing engine during the course of transaction processing.
Step 3: Send Proof of Testing to Electrum
Once you have completed all necessary tests, email your completed test pack to Electrum.
Step 4: Ecosystem (Pre-Production) Testing
Once you have successfully completed conformance testing, you can move onto ecosystem, or pre-production, testing. This involves full end-to-end testing between all participants including yourself, Electrum, the sponsor bank, and BankservAfrica in a pre-production environment.
Download the ecosystem/pre-production test pack here.
Carry out testing as described in steps 2 and 3 above. Send request messages to the Electrum pre-production enviroment using the endpoint that Electrum has supplied you with.