Signature algorithms
Signature generation steps
Let all the data sent or received be set M, sort the parameters of the non-null parameter values in the set M according to the ASCII code of the parameter name from small to large (dictionary order), and use the format of the URL key-value pair (i.e., key1=value1&key2=value2...). ) concatenated into the string stringA.
Finally, concatenate the key (merchant key) on stringA to obtain the stringSignTemp string, perform MD5 operation on stringSignTemp, and then convert all the characters of the obtained string to uppercase to obtain the sign value signValue.
example
For example, the request parameters are as follows:
Concatenate the string according to the rule to obtain the string to be signed
Final Signature Result
Final request parameters
Use the Signature SDK
Introduce the "supefina-sign" jar package into your own project
The signature operation is completed through the com.supefina.sign.SupefinaSignUtils#sign(java.lang.Object,java.lang.String) method. (Parameter 1: request parameter JSON object; Parameter 2: Merchant Key)
Sign the demo
Verify the demo
Última actualización