Commit 79c81def by jiang'yun

修改银行支付

parent 1d3caa6a
......@@ -34,7 +34,7 @@ public class CCBBackController {
@Autowired
private WaterOrderMapper orderMapper;
@PostMapping("/jh/notify")
@PostMapping("/payNotify/")
public String pay(CCBNotifyInfo notifyInfo) {
log.info("建行回调通知参数[{}]", JSON.toJSONString(notifyInfo));
String src = "POSID=" + notifyInfo.getPOSID() + "&BRANCHID=" + notifyInfo.getBRANCHID() + "&ORDERID=" + notifyInfo.getORDERID() +
......
package com.qianhe.system.controller;
import cn.hutool.core.util.EscapeUtil;
import com.google.gson.Gson;
import com.qianhe.common.core.domain.AjaxResult;
import com.qianhe.system.domain.WaterGoods;
import com.qianhe.system.utils.MD5;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
......@@ -32,6 +34,10 @@ public class CCBPayController {
String pk = "";
public static void main(String[] args) {
System.out.println(EscapeUtil.escape("中文"));
}
/**
* 预支付订单生成入口
*/
......@@ -45,7 +51,8 @@ public class CCBPayController {
//建行提供
String BRANCHID = "370000000";
String ORDERID = goods.getOrderNo();
String PAYMENT = goods.getTotalPrice();
//支付金额为数字类型
Double PAYMENT = Double.parseDouble(goods.getTotalPrice());
String CURCODE = "01";
String TXCODE = "530590";
String REMARK1 = "";
......@@ -56,7 +63,8 @@ public class CCBPayController {
String GATEWAY = "0";
String CLIENTIP = "127.0.0.1";
String REGINFO = "";
String PROINFO = goods.getTitle();
//中文需要转义
String PROINFO = goods.getOrderNo();
String REFERER = "";
String TRADE_TYPE = "MINIPRO";
//订水微信小程序appId
......@@ -83,6 +91,7 @@ public class CCBPayController {
macStr+= "&TRADE_TYPE="+TRADE_TYPE;
macStr+= "&SUB_APPID="+SUB_APPID;
macStr+= "&SUB_OPENID="+SUB_OPENID;
System.out.println("------------------------------------------------------------------------"+macStr);
//参与MAC计算所需参数具体看开发文档
String macStrMd5 = MD5.EncodeByMD5(macStr);
......
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