When and How To Use "Test Mode"
Test mode allows you to perform end to end testing of Supertab without the need to incur real charges or use real credit cards.
This is helpful during the integration of Supertab in your site as it allows you to test the paywall functionality (entitlements, payments, and subscriptions) without the need for exposing a real charge or credit card to your testing environment.
Using Test Mode
There are two ways you can use "test mode" with Supertab.
- Copy and paste the code from the Business Portal with the "test mode" .
- Swapping your
client_id
from a production client to a test client.
Copy/Pasting Code From the Business Portal
- Login to the Business Portal
- Ensure that you have the correct site selected. Then click on "Experiences", and the pencil icon next to the experience you want to use "test mode" with.
- Ensure that the "test mode" option is selected then copy and paste your code into your website or application.
Note: Changing the option from test mode to live mode will not make the change automatically. You need to copy the new "live mode" code to your production environment for live credit cards to be processed.
Swapping Client IDs
If you already have your code deployed to an environment you can simply swap your client IDs from test mode to live mode by simply changing your ID in your code.
- Login to the Business Portal
- Ensure that you have the correct site selected. Then click on "Experiences", and the pencil icon next to the experience you want to use "test mode" with.
Note the new client IDs for "test mode" and "live mode"
In this example, the client IDs to use are:
Test Mode: test_client.bdcd0526-17ae-4978-a0b6-cd4e811a96d0 Live Mode: live_client.6999fe73-78cc-4ed0-affa-17f54b60602d
Note: Simply replacing test_client with live_client before the GUID portion of the ID will not work.
- Replace the client IDs as required in your code.
Confirming Test Mode Is Enabled
When test mode is enabled on your site, a warning will indicate such whenever a credit card is required to proceed.
Test Mode and Credit Cards
When test mode is enabled, you are able to use "test" credit card numbers to simulate purchases. For a full list of test credit card numbers, please see our relevant documentation page regarding test mode.