目录

请求示例

PayMercAuth payMercAuth = new PayMercAuth();
String traceId = KeyGenUtils.getTraceId();
Long time = System.currentTimeMillis();
payMercAuth.setCallerId(mercNo);
payMercAuth.setTraceId(traceId);
payMercAuth.setTime(time);
payMercAuth.setAuthId(authId);
 
String bodySign = RSAUtils.signByRSAWithPSS(bodySourceData, priKey);
String headerSourceData = "authId=" + authId + "&bodySign=" + bodySign + "&callerId=" + mercNo + "&time=" + time + "&traceId=" + traceId;
String headerSign = RSAUtils.signByRSAWithPSS(headerSourceData, priKey);
payMercAuth.setHeaderSign(headerSign);
payMercAuth.setBodySign(bodySign);
String payMercAuthJsonStr = JSONObject.toJSONString(payMercAuth);
 
String billMatchUri = "/merchant/api/merc/v1/daily/billmatch/query";
String url = DemoKeys.HW_SERVER_ADDR + billMatchUri;
String response = HttpURLHelper.sendHttpPost(url, payMercAuthJsonStr, bodySourceData);
BillMatchResponse responses = JSONObject.parseObject(response,BillMatchResponse.class);