These tests are only relevant if your integration requires the user to be redirected via a Bango or Payment provider flow. This will be dependent on Payment Provider requirements. |
To use Bango's test payment provider 'TestPay' to test these scenarios generate a userId using the following details:
identificationMethodKey | GBR_BANGOREDIRECT |
---|---|
MSISDN | 447710900180 |
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction Optional: include a notificationUrl in the extensionData section to be notified when the user completes the redirect process.
| An HTTP response code 202 (Accepted) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Redirect user Send the user to the URL provided. | Confirm payment: Enter ZIP and confirm payment: After the user has completed any manual actions required they should be sent to your specified "callbackUrl" with externalTransactionId, transactionId and responseCode parameters appended.
The Bango API will also send a POST to the "notificationUrl" if one is provided in the initial request.
| ||
4 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 400 (Bad request) should be returned with the following body:
| ||
2 | Re-identify the user Send a valid POST request to https://api.bango.net/v5/identity E.g.
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Send the user to the URL provided. | After the user has completed any manual actions required they should be sent to your specified return URL. | ||
4 | Send POST request to https://api.bango.net/v5/identity/{sessionId}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
5 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
6 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction Optional: include a notificationUrl in the extensionData section to be notified when the user completes the redirect process.
| An HTTP response code 202 (Accepted) should be returned with the following body:
| ||
2 | (Optional) Retrieve transaction information Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Redirect user Send the user to the URL provided. | Confirm payment: Enter ZIP and confirm payment: After the user has completed any manual actions required they should be sent to your specified "callbackUrl" with externalTransactionId, transactionId and responseCode parameters appended.
The Bango API will also send a POST to the "notificationUrl" if one is provided in the initial request.
| ||
4 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
5 | Refund the transaction Send a valid DELETE request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|
Test | Action | Expected result | ||
---|---|---|---|---|
1 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction
| An HTTP response code 400 (Bad request) should be returned with the following body:
| ||
2 | Re-identify the user Send a valid POST request to https://api.bango.net/v5/identity E.g.
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
3 | Send the user to the URL provided. | After the user has completed any manual actions required they should be sent to your specified return URL. | ||
4 | Send POST request to https://api.bango.net/v5/identity/{sessionId}
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
5 | Start a transaction Send a valid POST request to https://api.bango.net/v5/transaction with new UserId
| An HTTP response code 200 (OK) should be returned with the following body:
| ||
6 | Redirect user Send the user to the URL provided. | Confirm payment: Enter ZIP and confirm payment: After the user has completed any manual actions required they should be sent to your specified "callbackUrl" with externalTransactionId, transactionId and responseCode parameters appended.
The Bango API will also send a POST to the "notificationUrl" if one is provided in the initial request.
| ||
7 | Commit the transaction Send a valid PUT request to https://api.bango.net/v5/transaction/{Bango-transaction-id}
| An HTTP response code 200 (OK) should be returned with the following body:
|