|
|
@@ -156,16 +156,17 @@ public class UnionPayRequestApiComponent {
|
|
|
httpHeaders.set("Authorization", getAccessToken());
|
|
|
// 请求
|
|
|
LOGGER.error("银联接口url:"+url);
|
|
|
- LOGGER.error("银联接口入参:"+params);
|
|
|
+ LOGGER.error("银联接口请求报文:"+params);
|
|
|
+ LOGGER.error("银联接口加密请求报文:"+data);
|
|
|
HttpEntity<String> httpEntity = new HttpEntity<>(data.toString(), httpHeaders);
|
|
|
ResponseEntity<String> response = restTemplate.postForEntity(url, httpEntity, String.class);
|
|
|
JSONObject resp = JSONObject.parseObject(response.getBody());
|
|
|
-
|
|
|
+ LOGGER.error("银联接口响应报文:"+resp);
|
|
|
if ("20000000".equals(resp.getString("errCode"))) {
|
|
|
String privateKey = unionPayApiConfigurationProperties.getPrivateKey();
|
|
|
String respData = SM2.sm2Decrypt(resp.getString("data"),
|
|
|
privateKey);
|
|
|
- LOGGER.error("银联接口返参:"+respData);
|
|
|
+ LOGGER.error("银联接口解密响应报文:"+respData);
|
|
|
return JSONObject.parseObject(respData, UnionPayResponse.class);
|
|
|
} else {
|
|
|
throw new SystemException("银联信息验证异常[" + resp.getString("errCode") + ":" +
|