Bango uses cookies to give you the best website experience. By using this website you agree to let Bango use cookies. More info
OK
Bango Developer
  1. Bango Resale
  2. For resellers
  3. Testing
  4. Testing overview

Testing overview

What you need to test to go live with the Bango Reseller API

You must test your code, and Bango must certify your test results, before you can go live.

All development and most testing uses test credentials, which Bango supplies to you when you sign up. These credentials let you use the full capabilities of the Bango Reseller API, with production URLs, but sandboxed to ensure you and your test users can't accidentally work with live merchants and live services.

Bango recommends two stages of testing:

  1. API testing: with test credentials, making sure your code sends correctly formatted API requests, and handles responses appropriately
  2. Production testing: real-world testing with production credentials and live merchants
Certification Process Prerequisites
  1. Valid Bango Resale API username and password for a Bango test account
  2. IP addresses for the reseller systems provided and whitelisted on Bango system
  3. Basic Authentication
Bango Music

Bango Music is a test merchant provided by Bango which simulates a merchant. Bango Music can be used to test against the Bango platform without a live merchant connection.

For all certification tests, the following API parameters should be used:

  1. productKey: BangoMusic
  2. merchantAccountKey: BANGO (case sensitive)

Before commencing with the testing, the reseller can use the Service Availability API to ensure basic network connection is working correctly.

0 – Connectivity Test

Prerequisites: Refer ‘Certification Process Prerequisites’

Action: Using the Bango Resale method to send a service availability request; https://resale.api.bango.net/v1/echo/[echoRequestId]

Expected Result: HTTP 200

"responseCode": "OK",
"responseMessage": "Success",
"echo": "a25100b8-4e0c-4e37-b921-cac9cb1e930f"

Certification

Successful First Time Activation

These steps will certify the reseller can create a pending entitlement for the first time and activate the entitlement. The reseller will certify they can query and cancel an entitlement using the below steps.

1 – Create Entitlement

Prerequisites: N/A

Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:

  1. customerIdentifier
  2. merchantAccountKey
  3. productKey
  4. notificationUrl

Expected Result: HTTP 202

"responseCode": "CLIENT_ACTION_REQUIRED",
"parameters": {
    "action": "NAVIGATE_TO_URL",
    "url": "https://stubby.bango.net/BangoMusic?entitlementGuid=<GUID>&automated=false"
},
"entitlementId": "___”

2 – Query Entitlement

Prerequisites: Entitlement created successfully in action 1

Action: Using the Bango Resale method to query an entitlement. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "PENDING",

3 – Navigate to URL

Prerequisites: Entitlement created successfully in action 1

Action: Click ‘Activate Subscription Button

Expected Result: Presented with “Premium – Buy now with 1 click!” option. Do not click the button, the presentation of this pages means the entitlement is now active. Activation notification should have been received.

4 – Query Entitlement

Prerequisites: Entitlement activated successfully in action 3

Action: Using the Bango Resale method to query the entitlement from action 1. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "ACTIVE",

5 – Cancelling an Entitlement

Prerequisites: Entitlement activated successfully in action 3

Action: Using the Bango Resale method to cancel an entitlement with appropriate parameters for your integration.

  1. cancelReasonCategory
  2. cancelReasonCode
  3. cancelReasonDescription
https://resale.api.bango.net/v1/entitlement/cancel/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "CANCELLED",

6 – Query Entitlement

Prerequisites: Entitlement cancelled successfully in action 5

Action: Using the Bango Resale method to query the entitlement from action 1. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "CANCELLED",

Double Activation

The double activation certification is to check the reseller can not activate the same entitlement twice. This is completed by requesting a second entitlement using the same parameters as the first. This reseller will also revoke the entitlement.

7 – Create Entitlement

Prerequisites: N/A

Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:

  1. customerIdentifier
  2. merchantAccountKey
  3. productKey
  4. notificationUrl

Expected Result: HTTP 202

"responseCode": "CLIENT_ACTION_REQUIRED",
"parameters": {
    "action": "NAVIGATE_TO_URL",
    "url": "https://stubby.bango.net/BangoMusic?entitlementGuid=<GUID>&automated=false"
},
"entitlementId": "___”

8 – Navigate to URL

Prerequisites: Entitlement created successfully in action 7

Action: Click ‘Activate Subscription Button

Expected Result: Presented with “Premium – Buy now with 1 click!” option. Do not click the button, the presentation of this pages means the entitlement is now active. Activation notification should have been received.

9 – Create Entitlement

Prerequisites: Entitlement created successfully in action 7

Action: Using the Bango Resale method to create a new entitlement with the same parameters as action 7.

Expected Result: HTTP 400

responseCode": "BAD_REQUEST",
"responseMessage": "Invalid request or the request contains invalid data.
Maximum number of subscriptions for user reached",

10 – Query Entitlement

Prerequisites: Entitlement activated successfully in action 7

Action: Using the Bango Resale method to query the entitlement from action 7. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "ACTIVE",

11 – Revoking an Entitlement

Prerequisites: Entitlement activated successfully in action 7

Action: Using the Bango Resale method to revoke an entitlement with appropriate parameters for your integration.

  1. cancelReasonCategory
  2. cancelReasonCode
  3. cancelReasonDescription
https://resale.api.bango.net/v1/entitlement/revoke/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "REVOKED",

12 – Query Entitlement

Prerequisites: Entitlement revoked successfully in action 11

Action: Using the Bango Resale method to query the entitlement from action 7. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "REVOKED",

Expiry and Renewals

The reseller will set an expiry date, a notification URL to certify the auto expiry and reseller notification to certify the reseller can consume a cancel notification from Bango. This step will also certify the reseller can request entitlement updates.

13 – Create Entitlement

Prerequisites: N/A

Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:

  1. customerIdentifier
  2. merchantAccountKey
  3. productKey
  4. notificationUrl
  5. dateExpiry

Expected Result: HTTP 202

"responseCode": "CLIENT_ACTION_REQUIRED",
"parameters": {
    "action": "NAVIGATE_TO_URL",
    "url": "https://stubby.bango.net/BangoMusic?entitlementGuid=<GUID>&automated=false"
},
"entitlementId": "___”,
"dateExpiry": "___"

14 – Navigate to URL

Prerequisites: Entitlement created successfully in action 13

Action: Click ‘Activate Subscription Button

Expected Result: Presented with “Premium – Buy now with 1 click!” option. Do not click the button, the presentation of this pages means the entitlement is now active. Activation notification should have been received.

15 – Update Entitlement

Prerequisites: Entitlement activated successfully in action 13

Action: Using the Bango Resale method to update an entitlement with a new expiry time close to the time now.

  1. entitlementId
  2. dateExpiry

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"dateExpiry": "___",

16 – Query Entitlement

Prerequisites: Entitlement created successfully in step 13

Action: Using the Bango Resale method to query an entitlement. Once the time has passed on the expiry date and time set in step 15. Query the entitlement using the entitlement ID provided in action 13. https://resale.api.bango.net/v1/entitlement/[entitlementId]

Expected Result: HTTP 200

responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "CANCELLED",

For more information, contact Bango Support.

In this section:

Copyright © 2000–2023 Bango.net Limited