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:
- API testing: with test credentials, making sure your code sends correctly formatted API requests, and handles responses appropriately
- Production testing: real-world testing with production credentials and live merchants
Certification Process Prerequisites- Valid Bango Resale API username and password for a Bango test account
- IP addresses for the reseller systems provided and whitelisted on Bango system
- Basic Authentication
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:
- productKey: BangoMusic
- 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.
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"
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.
Prerequisites: N/A
Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:
- customerIdentifier
- merchantAccountKey
- productKey
- 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": "___”
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",
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.
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.
- cancelReasonCategory
- cancelReasonCode
- cancelReasonDescription
https://resale.api.bango.net/v1/entitlement/cancel/[entitlementId]
Expected Result: HTTP 200
responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "CANCELLED",
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.
Prerequisites: N/A
Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:
- customerIdentifier
- merchantAccountKey
- productKey
- 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": "___”
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.
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",
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.
- cancelReasonCategory
- cancelReasonCode
- cancelReasonDescription
https://resale.api.bango.net/v1/entitlement/revoke/[entitlementId]
Expected Result: HTTP 200
responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"status": "REVOKED",
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.
Prerequisites: N/A
Action: Using the Bango Resale method to create a new entitlement with appropriate parameters for your integration:
- customerIdentifier
- merchantAccountKey
- productKey
- notificationUrl
- 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": "___"
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.
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.
- entitlementId
- dateExpiry
Expected Result: HTTP 200
responseCode": "OK",
"responseMessage": "Success",
"entitlementId": "___",
"dateExpiry": "___",
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.