1. After getting your security credentials (client public/ private keys and bank public key), create a folder under src/main/resources/keys with your desired project name.
2. Place the keys inside the folder
3. Open src/main/resources/config.json and input as below:
{
  "projects": [
    {
      "name": "Project Name", //The name must be the same as the folder name where you store your keys
      "clientProfileId": "EvVM4uo3T53Oody0QAl22xie1CueuHnS", //Input Client's HSBC API Profile
      "oboProfileId": "PC000006001", //Customer Identifier from your platform, Optional, only used for B2B2B integration.
      "clientSecret": "pU7MG5qt6YStBHuC", //Only used for sandbox, obtained from Dev Hub Project on develop.hsbc
      "organizationId": "24", //Only used for sandbox, obtained from Dev Hub Project on develop.hsbc
      "pgpKeys": {
        "fileNames": {
          "bankPublic": "hsbc-public.key", //Input the name of bank public key given
          "clientPublic": "client-public.key", //Input the name of client public key you generated (If you are using sandbox, use the key sandbox generated for your)
          "clientPrivate": "client-private.key" //Input the name of client private key you generated (If you are using sandbox, use the key sandbox generated for your)
        },
        "clientPrivateKeyPassphrase": "1password"  //Input the passPhrase of client private key
      },
      "xHsbcCryptoSignature": true, //Input true if you are using API Version > 3
      "targetHost": "SANDBOX", //Input the environment you would like to connect to
      "clientHostingRegion": "SG",  //Input your Hosting Region
      "active": true //You can add multiple projects, hence this is the flag to choose which project you are using
    }
  ]
}
4. Update src/main/java/config/ClientConfig.java and update proxy settings if any.
5. To Test Encryption:
   a. Input Plain Json Request Content under src/main/resources/request-json-file/wsit/SampleRequestContent.json
   b. Run src/main/java/api/wsit/request_helper/WsitApiEncryptAndGenerateAuthToken
6. To Test Decryption:
   a. Input Response Message under src/main/resources/request-json-file/wsit/SampleResponseMessage.json
   b. Run src/main/java/api/wsit/request_helper/WsitApiProcessResponseMessage
7. You may also run a full journey for API Endpoint by running respective endpoint under src/main/java/api/wsit/product_request/Corresponding Product Class
   a. For API Version > 3, please run respective endpoint under Class "v3", for previous version, please run respective endpoint under Class "v1"
   b. Note: Currently, Version 3 are not available on Sandbox. However the Authentications are pretty much the same. The encrypt and decrypt methods included in this package can be used to run all versions.
   c. We suggest you register a sandbox project to run the request (Class: "v1") to test your Authentication only. Use the (Class: "v3") version for your development and go live