Last updated

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 InitiationRequest as specified in the test pack. You will receive an InitiationResponse.
    • 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.  
  • 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:

  1. Send an InitiationRequest to the testing platform endpoint (that was provided during onboarding) conforming to the schema below:
testIdstringrequired
initiationDetailsobject(InitiationDetails)required
initiationDetails.​domainstringrequired

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

initiationDetails.​proxystringrequired

The value for which the proxy resolution will be performed

initiationDetails.​proxyTypestring

The type of proxy, such as MBNO (mobile number) or CUST (custom). Initiations will default to MBNO if this is not set.

Enum"MBNO""CUST"
initiationDetails.​amountnumber(double)>= 0

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.

initiationDetails.​creditorReferencestring

The reference for the creditor

KEY PARAMETERS

The following parameters must be included in the request:

  • Test ID: testId.
  • Domain – the domain value 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.
Note

Contact Electrum if you have not yet received the development environment endpoint that you will need in order to carry out testing.

  1. In a response to an InitiationRequest, the testing platform returns an InitiationResponse message. 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.
uetrstring(uuid)

The UETR/UUID for the newly initiated transaction

Now that the test has been initiated:

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

Note

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.

  1. Send a TestQuery request to the testing platform conforming to the schema below.

This a GET call to the /tests{uetr} endpoint.

KEY PARAMETER

The uetr field contains the UETR of the transaction that was processed during the test.

  1. In response to a TestQuery request, the testing platform will return a QueryResponse message. This response will include a list of all state events generated by the EPC processing engine during the course of transaction processing.
statesArray of stringsrequired

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.