Interface encryption and decryption instructions
Serial numer | Domain name | Variable name | Required | Field Type | Remarks |
---|
1 | Version Number | version | M | String(6) | 1.0.0 |
2 | Merchant Number | userNo | M | Number | The unique number provided to the merchant |
3 | Data Type | dataType | M | String(8) | JSON |
4 | Encrypted data | dataContent | M | String(2048) | The specific parameters are as follows for the encrypted data |
1.
Convert dataContent to a JSON string.
2.
Perform base64 encoding on the JSON string.
3.
Use RSA 1024 to perform asymmetric encryption on the base64-encoded data to obtain a byte array.
4.
Convert the byte array into a hexadecimal string.
Serial numer | Domain name | Variable name | Required | Field Type | Remarks |
---|
1 | Success Identifier | success | M | boolean | Return true (success), false |
2 | Error Code | errorCode | O | String(6) | Success is false, errorCode has a value, see the error code description for details. |
3 | Error Description | errorMsg | O | String(256) | Error description, not empty when success is false |
4 | Return result information | result | O | String(1024) | When SUCCESS is false, it is empty; otherwise, it is not empty. |
5 | Merchant Number | userNo | M | String(11) | The unique number provided to the merchant |
6 | Whether it is asynchronous | async | M | String(1024) | True indicates that the business processing will callback to notify the result, and false indicates synchronous processing, result. |
1、The format of the returned data is the same as the merchant's JSON. The merchant first decrypts it with the public key and then decodes it from base64 to obtain it.Modified at 2024-12-11 08:47:58