Commit b846c240 authored by 5359's avatar 5359

获取支付二维码接口代码调整

parent 91385585
...@@ -147,7 +147,7 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService { ...@@ -147,7 +147,7 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService {
logger.info("发送收款码申请请求,请求参数: {}", mapper.writeValueAsString(apiHeader)); logger.info("发送收款码申请请求,请求参数: {}", mapper.writeValueAsString(apiHeader));
try { try {
// 发送HTTP post请求 // 发送HTTP post请求
response = Utils.postString(url, signResult, apiHeader); response = Utils.postForEntity(url, signResult, apiHeader);
//处理接口日志 //处理接口日志
logger.info("收款码申请返回结果:" + mapper.writeValueAsString(response)); logger.info("收款码申请返回结果:" + mapper.writeValueAsString(response));
...@@ -382,7 +382,7 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService { ...@@ -382,7 +382,7 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService {
BigDecimal b1 = new BigDecimal(Double.toString(100)); BigDecimal b1 = new BigDecimal(Double.toString(100));
requestTransactionParams.put("txnAmt", a1.multiply(b1).stripTrailingZeros().toPlainString()); //交易金额,单位为分(必传) requestTransactionParams.put("txnAmt", a1.multiply(b1).stripTrailingZeros().toPlainString()); //交易金额,单位为分(必传)
requestTransactionParams.put("currencyCode", currencyCode); //交易币种,默认156,目前只支持人民币(156) requestTransactionParams.put("currencyCode", currencyCode); //交易币种,默认156,目前只支持人民币(156)
requestTransactionParams.put("body", "聚合支付测试"); //商户号(必传) // requestTransactionParams.put("body", "聚合支付测试"); //商户号(必传)
//商户保留域 //商户保留域
JSONObject mchReserved = new JSONObject(); JSONObject mchReserved = new JSONObject();
...@@ -396,9 +396,6 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService { ...@@ -396,9 +396,6 @@ public class HclcCmbPolyServiceImpl implements HclcCmbPolyService {
//对待加签内容进行排序拼接 //对待加签内容进行排序拼接
String signContent = SignatureUtil.getSignContent(requestPublicParams); String signContent = SignatureUtil.getSignContent(requestPublicParams);
//签名内容
logger.info("签名内容:" + signContent);
//加签 //加签
requestPublicParams.put("sign", SM2Util.sm2Sign(signContent, privateKey)); requestPublicParams.put("sign", SM2Util.sm2Sign(signContent, privateKey));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment