Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents
indent25px

...

To use Bango's test payment provider 'TestPay' to test this scenarios scenario generate a userId using the following details:

identificationMethodKey

GBR_BANGO
MSISDN447710900120


Test

Action

Expected result

1

Send a valid 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:

Code Block
{ 
    "responseCode": "OK", 
    "responseMessage": "Success.",
    "availablePaymentMethods":
    [
        {
            "type": "OPERATORBILLING",
            "key": "{network-name}",
            "description": "Direct operator billing",
            "parameters":
            {
            }
        }
    ]
}


...

This scenario can be tested using Prefer Headers or by forcing an error.

Test

Action

Expected result

1

Option 1: Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=404


Option 2: Send a GET request with an invalid bango transaction id to https://api.bango.net/v5/transaction/{Invalid-bango-transaction-id}


An HTTP response code 202 (Accepted) should be returned with the following body:

Code Block
{
  "responseCode": "NOT_FOUND",
  "responseMessage": "Invalid transaction id."
}


...

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=400


An HTTP response code 202 (Accepted) should be returned with the following body:

Code Block
{
  "responseCode": "BAD_REQUEST",
  "responseMessage": "Invalid request."
}


...

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=401


An HTTP response code 202 (Accepted) should be returned with the following body:

Code Block
{
  "responseCode": "UNAUTHORIZED",
  "responseMessage": "Invalid access credentials."
}


...

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=500

An HTTP response code 202 (Accepted) should be returned with the following body:

Code Block
{
  "responseCode": "INTERNAL_ERROR",
  "responseMessage": "The server encountered an unexpected condition which prevented it from fulfilling the request."
}


...

This scenario can be tested using Prefer Headers.

Test

Action

Expected result

1

Send a GET request to https://api.bango.net/v5/transaction/{Bango-transaction-id}


Include the following headers in the request:

  • Prefer:status=503

An HTTP response code 202 (Accepted) should be returned with the following body:

Code Block
{
  "responseCode": "SERVICE_UNAVAILABLE",
  "responseMessage": "The server is undergoing maintenance and is 
not available. Please, try again later."
}


...