#Before you start
Before using iMock, go to Alipay Developer Center, enter the Integration Settings section, and configure your settings for the sandbox environment.
- Click the Sandbox tab, then click Edit public key.
- Enter your public key and click Submit.
If you do not have one, you can download the tool for generating RSA2 keys and use it to generate your keys.
- Enter your notification URL, which will be used for receiving notifications.
iMock provides simulations of different API results and returns the specified response for integration testing.
iMock can simulate all the result codes, including production environment scenarios that are rare but not entirely impossible. This helps developers to work with the same corresponding system logic processing in sandbox. The effective time of the mock results can be changed by adjusting the mock time.
All types of responses are designed by Alipay for indicating different result codes. No response is specified by default. If you specify the response, this type of response for the corresponding API is always returned when iMock is turned on.
API Mock will be turned off automatically when the time is up. The duration can be set as 30min, 60min, 90min or 120min. The user can set the time for automatic shutdown manually.
To start using the iMock tool for simulations of different API results, go to Alipay Developer Center, create an application, and then locate iMock under Development Tools.