11 Generating TestPay bangoUserIds




To use Bango's test payment provider 'TestPay' to test different scenarios you will need to generate bangoUserIds using the instructions below.


Generating bangoUserIds for API only tests

Action

Expected result

Send a POST request to https://api.bango.net/v5/identity

Include:

  • identificationMethodKey GBR_BANGO
  • callbackURL with a ut parameter containing the MSISDN of the correspoding test result from the table below

E.g, the following will generate a bangoUserId to test OK transaction responses.

{
   "identificationMethodKey": "GBR_BANGO",
   "callbackUrl": "{your-callback-url}/?ut=447710900120"
}

An HTTP response code 200 (OK) should be returned with the following body:

{
  "responseCode": "CLIENT_ACTION_REQUIRED",
  "responseMessage": "Merchant action is required to complete the identification process.",
  "parameters": {
    "action": "REDIRECT",
    "url": "{redirect-url}"
  },
  "sessionId": "8322c4adc6ad4046b58ecb4a9f0b1551",
  "bangoUserId": null
}

Visit the redirect url returned in the previous response and complete the identification flow with the following information:

  • when prompted for your mobile phone number use the MSISDN used in the identity POST above
  • when propted for a PIN code use 1234
The process should complete successfully and redirect the user to the callback url.

Send a POST request to http://api.bango.net/v5/identity/{session-id}

E.g. http://api.bango.net/v5/identity/8322c4adc6ad4046b58ecb4a9f0b1551

An HTTP response code 200 (OK) should be returned with the following body, containing the bangoUserId:

{
  "responseCode": "OK",
  "responseMessage": "Identification finished successfully, no more actions to run.",
  "parameters": {},
  "sessionId": "8322c4adc6ad4046b58ecb4a9f0b1551",
  "bangoUserId": "472156480"
}


USA Format

identificationMethodKeyMSISDNTest casePayment type
USA_BANGO12025550120OKAPI only
USA_BANGO12025550121Insufficient creditAPI only
USA_BANGO12025550122User barredAPI only
USA_BANGO12025550123User Not EnabledAPI only
USA_BANGO12025550124User SuspendedAPI only
USA_BANGO12025550125Spend limitAPI only
USA_BANGO12025550129Transaction Declined (start)API only
USA_BANGO12025550130Transaction Declined (commit)API only
USA_BANGO12025550131Transaction Declined (cancel)API only
USA_BANGO12025550132Transaction Declined (refund)API only
USA_BANGO12025550133Connect error (start)API only
USA_BANGO12025550134Connect error (capture)API only
USA_BANGO12025550135Connect error (cancel)API only
USA_BANGO12025550136Connect error (refund)API only
USA_BANGO12025550141Billing provider error (start)API only
USA_BANGO12025550142Billing provider error (commit)API only
USA_BANGO12025550143Billing provider error (cancel)API only
USA_BANGO12025550144Billing provider error (refund)API only
USA_BANGO12025550145

Invalid userId (start)

API only


UK Format

identificationMethodKeyMSISDNTest casePayment type
GBR_BANGO447710900120OKAPI only
GBR_BANGO447710900121Insufficient creditAPI only
GBR_BANGO447710900122User barredAPI only
GBR_BANGO447710900123User Not EnabledAPI only
GBR_BANGO447710900124User SuspendedAPI only
GBR_BANGO447710900125Spend limitAPI only
GBR_BANGO447710900129Transaction Declined (start)API only
GBR_BANGO447710900130Transaction Declined (commit)API only
GBR_BANGO447710900131Transaction Declined (cancel)API only
GBR_BANGO447710900132Transaction Declined (refund)API only
GBR_BANGO447710900133Connect error (start)API only
GBR_BANGO447710900134Connect error (capture)API only
GBR_BANGO447710900135Connect error (cancel)API only
GBR_BANGO447710900136Connect error (refund)API only
GBR_BANGO447710900141Billing provider error (start)API only
GBR_BANGO447710900142Billing provider error (commit)API only
GBR_BANGO447710900143Billing provider error (cancel)API only
GBR_BANGO447710900144Billing provider error (refund)API only
GBR_BANGO447710900145

Invalid userId (start)

API only


Generating bangoUserIds for payment redirect flow tests

Action

Expected result

Send a POST request to https://api.bango.net/v5/identity

Include:

  • identificationMethodKey GBR_BANGOREDIRECT
  • callbackURL with a ut parameter containing the MSISDN of the correspoding test result from the table below

E.g, the following will generate a bangoUserId to test OK transaction responses.

{
   "identificationMethodKey": "GBR_BANGO",
   "callbackUrl": "{your-callback-url}/?ut=447710900180"
}

An HTTP response code 200 (OK) should be returned with the following body:

{
  "responseCode": "CLIENT_ACTION_REQUIRED",
  "responseMessage": "Merchant action is required to complete the identification process.",
  "parameters": {
    "action": "REDIRECT",
    "url": "{redirect-url}"
  },
  "sessionId": "8322c4adc6ad4046b58ecb4a9f0b1552",
  "bangoUserId": null
}

Visit the redirect url returned in the previous response and complete the identification flow with the following information:

  • when prompted for your mobile phone number use the MSISDN used in the identity POST above
  • when propted for a PIN code use 1234
The process should complete successfully and redirect the user to the callback url.

Send a POST request to http://api.bango.net/v5/identity/{session-id}

E.g. http://api.bango.net/v5/identity/8322c4adc6ad4046b58ecb4a9f0b1552

An HTTP response code 200 (OK) should be returned with the following body, containing the bangoUserId:

{
  "responseCode": "OK",
  "responseMessage": "Identification finished successfully, no more actions to run.",
  "parameters": {},
  "sessionId": "8322c4adc6ad4046b58ecb4a9f0b1551",
  "bangoUserId": "499491990"
}


UK Format

identificationMethodKeyMSISDNTest casePayment type
GBR_BANGOREDIRECT447710900180OKRedirect
GBR_BANGOREDIRECT447710900181Insufficient creditRedirect
GBR_BANGOREDIRECT447710900182User barredRedirect
GBR_BANGOREDIRECT447710900183User Not EnabledRedirect
GBR_BANGOREDIRECT447710900184User SuspendedRedirect
GBR_BANGOREDIRECT447710900185Spend limitRedirect
GBR_BANGOREDIRECT447710900189Transaction Declined (start)Redirect
GBR_BANGOREDIRECT447710900190Transaction Declined (commit)Redirect
GBR_BANGOREDIRECT447710900191Transaction Declined (cancel)Redirect
GBR_BANGOREDIRECT447710900192Transaction Declined (refund)Redirect
GBR_BANGOREDIRECT447710900193Connect error (start)Redirect
GBR_BANGOREDIRECT447710900194Connect error (capture)Redirect
GBR_BANGOREDIRECT447710900195Connect error (cancel)Redirect
GBR_BANGOREDIRECT447710900196Connect error (refund)Redirect
GBR_BANGOREDIRECT447710900201Billing provider error (start)Redirect
GBR_BANGOREDIRECT447710900202Billing provider error (commit)Redirect
GBR_BANGOREDIRECT447710900203Billing provider error (cancel)Redirect
GBR_BANGOREDIRECT447710900204Billing provider error (refund)Redirect
GBR_BANGOREDIRECT447710900205

Invalid userId (start)

Redirect