POST https://vipapi.matrixpay.io/sdk/user/create
var SecretKey = "YOUR_SECRET_KEY";
var timestamp = (new Date()).valueOf();
var param = JSON.parse(request.data);
var newkey = Object.keys(param).sort();
var dataStr = "";
for(var i = 0; i < newkey.length; i++) {
if(newkey[i] == "sign") {
continue;
}
if(param[newkey[i]].length != 0) {
if(dataStr.length == 0) {
dataStr += newkey[i] + "=" + param[newkey[i]];
} else {
dataStr += "&" + newkey[i] + "=" + param[newkey[i]];
}
}
}
var strToHash = SecretKey + dataStr + timestamp;
var hash = CryptoJS.MD5(strToHash).toString();
postman.setGlobalVariable("timestamp", timestamp);
postman.setGlobalVariable("sign", hash);
{
"sign": "BSlP6Ribf8q3MuVcgLP2NMbJbTAQ3GcC1UeGc6LQVpQVGWKE5X4sSzu/8CEncDLMpqzxPNWU4CxTdkOINkTIuHqEG/iWwfi4hhyFPOpKa7pB/O3S1KOm/cEDJumFCqD9+r9ohR4XiSQdEEY4592Q1LufURwwpsdomcTjrgG1PWbUxlT4DHVMoYA75p5kJhNYhmcvm/xjWE2P9uZMGigkrfJjTrkM0CSyPhm4tptnD6RQheE2efmM5hzMkk71cIn1UfVk2hpxSALQauLFhiGA9ZHFuk+gmcPXr6a9aqGV7Os4hSWnY2Y58knzL4/hxslgYjQo7pPysLPLMAntLR6xTQ==",
"timestamp": "1710514699298",
"data": {
"OpenId": "Hash2024031501"
},
"code": 1,
"msg": "ok"
}