Currently, the secret (secrete) is obtained through offline methods or the merchant management platform.
secrete:The secret is used to digest and sign the input parameters for API requests. It should be kept by the merchant themselves, and it is essential to ensure strict security measures to prevent its disclosure to external parties.
To generate a signature string:all the parameters that need to be verified should be assembled into an array and sorted in ascending order based on the parameter names’ dictionary order using ASCII code. It’s important to note that only the parameter keys are sorted, and the values are not involved in the sorting process.
All required field values participate in the signature calculation (excluding “sign”).
To prepare the string for signing, convert the format of each parameter to “parameter_name=parameter_value” and join them using the “&” symbol. Finally, append the key (secrete) at the end. The resulting string would be as follows: