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:
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:
| 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
identificationMethodKey | MSISDN | Test case | Payment type |
---|---|---|---|
USA_BANGO | 12025550120 | OK | API only |
USA_BANGO | 12025550121 | Insufficient credit | API only |
USA_BANGO | 12025550122 | User barred | API only |
USA_BANGO | 12025550123 | User Not Enabled | API only |
USA_BANGO | 12025550124 | User Suspended | API only |
USA_BANGO | 12025550125 | Spend limit | API only |
USA_BANGO | 12025550129 | Transaction Declined (start) | API only |
USA_BANGO | 12025550130 | Transaction Declined (commit) | API only |
USA_BANGO | 12025550131 | Transaction Declined (cancel) | API only |
USA_BANGO | 12025550132 | Transaction Declined (refund) | API only |
USA_BANGO | 12025550133 | Connect error (start) | API only |
USA_BANGO | 12025550134 | Connect error (capture) | API only |
USA_BANGO | 12025550135 | Connect error (cancel) | API only |
USA_BANGO | 12025550136 | Connect error (refund) | API only |
USA_BANGO | 12025550141 | Billing provider error (start) | API only |
USA_BANGO | 12025550142 | Billing provider error (commit) | API only |
USA_BANGO | 12025550143 | Billing provider error (cancel) | API only |
USA_BANGO | 12025550144 | Billing provider error (refund) | API only |
USA_BANGO | 12025550145 | Invalid userId (start) | API only |
UK Format
identificationMethodKey | MSISDN | Test case | Payment type |
---|---|---|---|
GBR_BANGO | 447710900120 | OK | API only |
GBR_BANGO | 447710900121 | Insufficient credit | API only |
GBR_BANGO | 447710900122 | User barred | API only |
GBR_BANGO | 447710900123 | User Not Enabled | API only |
GBR_BANGO | 447710900124 | User Suspended | API only |
GBR_BANGO | 447710900125 | Spend limit | API only |
GBR_BANGO | 447710900129 | Transaction Declined (start) | API only |
GBR_BANGO | 447710900130 | Transaction Declined (commit) | API only |
GBR_BANGO | 447710900131 | Transaction Declined (cancel) | API only |
GBR_BANGO | 447710900132 | Transaction Declined (refund) | API only |
GBR_BANGO | 447710900133 | Connect error (start) | API only |
GBR_BANGO | 447710900134 | Connect error (capture) | API only |
GBR_BANGO | 447710900135 | Connect error (cancel) | API only |
GBR_BANGO | 447710900136 | Connect error (refund) | API only |
GBR_BANGO | 447710900141 | Billing provider error (start) | API only |
GBR_BANGO | 447710900142 | Billing provider error (commit) | API only |
GBR_BANGO | 447710900143 | Billing provider error (cancel) | API only |
GBR_BANGO | 447710900144 | Billing provider error (refund) | API only |
GBR_BANGO | 447710900145 | 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:
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:
| 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
identificationMethodKey | MSISDN | Test case | Payment type |
---|---|---|---|
GBR_BANGOREDIRECT | 447710900180 | OK | Redirect |
GBR_BANGOREDIRECT | 447710900181 | Insufficient credit | Redirect |
GBR_BANGOREDIRECT | 447710900182 | User barred | Redirect |
GBR_BANGOREDIRECT | 447710900183 | User Not Enabled | Redirect |
GBR_BANGOREDIRECT | 447710900184 | User Suspended | Redirect |
GBR_BANGOREDIRECT | 447710900185 | Spend limit | Redirect |
GBR_BANGOREDIRECT | 447710900189 | Transaction Declined (start) | Redirect |
GBR_BANGOREDIRECT | 447710900190 | Transaction Declined (commit) | Redirect |
GBR_BANGOREDIRECT | 447710900191 | Transaction Declined (cancel) | Redirect |
GBR_BANGOREDIRECT | 447710900192 | Transaction Declined (refund) | Redirect |
GBR_BANGOREDIRECT | 447710900193 | Connect error (start) | Redirect |
GBR_BANGOREDIRECT | 447710900194 | Connect error (capture) | Redirect |
GBR_BANGOREDIRECT | 447710900195 | Connect error (cancel) | Redirect |
GBR_BANGOREDIRECT | 447710900196 | Connect error (refund) | Redirect |
GBR_BANGOREDIRECT | 447710900201 | Billing provider error (start) | Redirect |
GBR_BANGOREDIRECT | 447710900202 | Billing provider error (commit) | Redirect |
GBR_BANGOREDIRECT | 447710900203 | Billing provider error (cancel) | Redirect |
GBR_BANGOREDIRECT | 447710900204 | Billing provider error (refund) | Redirect |
GBR_BANGOREDIRECT | 447710900205 | Invalid userId (start) | Redirect |