Skip to main content

Postman test script instructions

The Postman test script written in JavaScript language can use the rich functions provided by Postman to conveniently test the gateway API, understand the process of integrating gateway rest API through HTTP, including adding and verifying signatures for calling payment gateway APIs.

The following steps provide a detailed description of how to add test scripts to your Postman tool.

1. Please ensure that you have installed Postman. If not, please go to the official website download.

2. Import the collection API File   Gateway-api.postman_collection.json to Postman.

Import the collection API File Gateway-api.postman_collection.json to Postman

3. Import the globals variable file   Gateway-api.postman_globals.json to Postman.

Import the globals variable file Gateway-api.postman_globals.json to Postman

4. Set the value of Globals.

APP_RSA_PRIVATE_KEY: It is your application's private key in PKCS1 format.
Please copy the content of FORGE_JS.js to FORGE_JS variable.

Set the value of Globals

5. Send HTTP requests, test APIs, and you can modify the parameter values of the Body.

Send HTTP requests, test APIs, and you can modify the parameter values of the Body

6. To view the process log, click on Console.

To view the process log, click on Console