4. Testing & Troubleshooting

Exception Handling performed by our UX solution. Sample PayIDs and accounts to trigger errors available.

Exception Handling

The Pay by Bank UX solution includes exception handling so that merchants do not need to manage these complexities.

Should merchants want to simulate exception scenarios, they are detailed here for the UAT environment. There are particular PayIDs which trigger exception scenarios such as insufficient funds to assist you with error handling and end to end testing.

PayTo

Ineligible PayID

Payment cannot be processed

Agreement not approved in time

Insufficient funds

PayID

Handling of overpayment for a specified amount. Transaction complete with overpayment automatically refunded.

Handling of overpayment for a specified amount. Transaction complete with overpayment automatically refunded.

Partial payment of specified amount.

Partial payment of specified amount.

Partial payment of specified amount. Automatic update with remaining amount to pay.

Partial payment of specified amount. Automatic update with remaining amount to pay.

UAT Test PayIDs

Refer to test accounts section for your own testing.

       <html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script>
        window.addEventListener('message', (event) => {
            console.log('Event Data ' + JSON.stringify(event.data))
            console.log('Event Origin ' + JSON.stringify(event.origin))
            console.log('Event Ports ' + JSON.stringify(event.ports))
      if (event.data.EventType === 'UserInterface') {
            const clientIframe = document.getElementById('client-iframe');
            clientIframe.height = event.data.Data.height;
            const height = document.getElementById('height');
            height.innerText = event.data.Data.height;
        }
        if (event.data.EventType === 'PaymentRequest') {
            const status = document.getElementById('payment-request-status');
            status.innerText = event.data.Data.PaymentRequestStatus.status;
        }
    })

    const updateUrl = () => {
        const input = document.getElementById('payment-request');
        const url = input.value;
        const iframe = document.getElementById('client-iframe');
        iframe.src = url;
    }

</script>
</head>
<body>
<div>
    <div>
        <label for="payment-request">Put the encoded id of PR</label>
        <input id="payment-request" data-test="url-input"/>
        <button onclick="updateUrl()" data-test="submit">Submit</button>
    </div>
    <div>
        <div>Status:</div>
        <div data-test="payment-request-status" id="payment-request-status"></div>
    </div>
    <div>
        <div>Height:</div>
        <div data-test="height" id="height"></div>
    </div>
    <iframe id="client-iframe"
            title="PayID payment"
            src=""
            style="border: 1px solid #000000; width: 100%;"
    />
</div>
<div>
</div>
<script>
 </script>
</body>
</html>