pos相关
This commit is contained in:
@@ -58,11 +58,10 @@ public class TokenUtil {
|
||||
finalMap.put("TOKEN", MD5Util.md5(token + APP_SECRET).toUpperCase());
|
||||
return finalMap;
|
||||
}
|
||||
//
|
||||
public static Map<String, String> getToken(String timestamp, String requestId, String appId, String reqData)throws Exception {
|
||||
String token = "";
|
||||
String encode = "";
|
||||
System.out.println(timestamp);
|
||||
System.out.println(requestId);
|
||||
System.out.println(appId);
|
||||
System.out.println(reqData);
|
||||
SortedMap<String, Object> map = new TreeMap();
|
||||
@@ -81,7 +80,7 @@ public class TokenUtil {
|
||||
System.out.println(token);
|
||||
Map<String, String> finalMap = new HashMap<>();
|
||||
finalMap.put("ENCODE",encode);
|
||||
finalMap.put("TOKEN", RSASignature.sign(encode, RSAUtil.CERT));
|
||||
finalMap.put("TOKEN", MD5Util.md5(token + APP_SECRET).toUpperCase());
|
||||
return finalMap;
|
||||
}
|
||||
|
||||
@@ -92,7 +91,14 @@ public class TokenUtil {
|
||||
System.out.println(s);
|
||||
String s1 = UUID.randomUUID().toString();
|
||||
System.out.println(s1);
|
||||
String param = "{\"date\":null,\"sn\":\"ZF544CG02S00001\",\"type\":null,\"page\":1,\"size\":10}";
|
||||
String param = "{\n" +
|
||||
" \"type\": \"4\",\n" +
|
||||
" \"consumeFee\": \"0.01\",\n" +
|
||||
" \"authCode\": \"283907976309543222\",\n" +
|
||||
" \"sn\": \"BSJQG01YJ0001\",\n" +
|
||||
" \"mercOrderNo\": \" \",\n" +
|
||||
" \"remark\": \"测试\"\n" +
|
||||
" }";
|
||||
Map<String, String> token = getToken(s, s1, APP_ID,param);
|
||||
System.out.println(token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user