Misc
Google Authenticator
Google Authenticator must be used during login and critical operations.
Google Authenticator generates random codes on your phone.
2FA provides extra layer of security for your account. You will need to enter the code generated by Google Authenticator in addition to your password.
Browsers
To ensure the best experience, we suggest to use the latestGoogle Chrome or (FireFox)
Signature
Signature is enforced to ensure the validity of paramters
Combining parameters in orders with MD5 Hash to get Signature
Steps as follows1
1. Combining all HTTP POST parameters alphabetically to paramString:
paramString = "aparam=xxx&bparam=yyy&cparam=zzz&..."
Note: All the parameters value must be urlencoded and in lowercases. Different languages may be urlencoded as uppercases or lowercases, and resulted in totally different MD5 hases. Please transfer to lowercases prior to MD5 hashing.
For example:
aparam=中文
is urlencoded as: aparam=%e4%b8%ad%e6%96%87
2. Append a parameter 'string' to paramString:
strToHash = paramString + "&secret=[Merchant secret]"
3. Perform MD5 hasing on results from above step.
hashResult = md5(strToHash)
4. Add sign to form parameters and submit the form (excluding secret)
1. Codes appeared in this guide are for demonstration purpose only. Please revise as necessary. ↩
API responses
All API requested by merchant will return a JSON with following format. The only exception is 'Trade API, with parameter returndataformat=clienthtml.
{
"code": ...,
"results": ...
}
code
is numerical, whileresults
describes the result of the request.
- When the request is successful,
code
is 0,results show the corresponding body of the request. - When the request is unsuccessful,
code
is not 0,results show the reason of the failure of the request.
After fetching the returned JSON, check if the request is succesful based on 'code. If so, take the data you requested for. If failed, check the error message and revise or contact our support if necessary.
Note: Code not showing 0 means API request failed. Typically it is related to unexpected or malformed data or parameters being received, not API system failing.