|
|
@@ -48,7 +48,7 @@ public class PayCommon {
|
|
|
//funcode接口名称
|
|
|
String funcode = PayConst.DCDACCYE;
|
|
|
obj_body.put("ctnkey", "");
|
|
|
- String result = PayRequest.doRequest(obj_body, funcode);
|
|
|
+ String result = PayRequest.doRequest(obj_body, funcode, hwSubcontractor.getAppId(), hwSubcontractor.getPaymentAddress() + ":" + hwSubcontractor.getPaymentPort());
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
JSONObject jsonObject1 = jsonObject.getJSONObject("response");
|
|
|
JSONObject jsonObjectHead = jsonObject1.getJSONObject("head");
|
|
|
@@ -62,7 +62,7 @@ public class PayCommon {
|
|
|
JSONObject jsonObject2 = jsonArray.getJSONObject(i);
|
|
|
System.out.println("户口号========" + jsonObject2.get("eacnbr"));
|
|
|
System.out.println("账号========" + jsonObject2.get("actnbr"));
|
|
|
- HwPayAccout hwPayAccout = iHwPayAccoutService.saveAccout(jsonObject2,hwSubcontractor.getId());
|
|
|
+ HwPayAccout hwPayAccout = iHwPayAccoutService.saveAccout(jsonObject2, hwSubcontractor.getId());
|
|
|
hwPayAccoutList.add(hwPayAccout);
|
|
|
}
|
|
|
System.out.println("head========" + jsonObjectHead.getString("resultcode"));
|
|
|
@@ -98,7 +98,7 @@ public class PayCommon {
|
|
|
}
|
|
|
obj_body.put("dbtacc", eacnbr);
|
|
|
obj_body.put("ccynbr", PayConst.ccynbr);
|
|
|
- String result = PayRequest.doRequest(obj_body, funcode);
|
|
|
+ String result = PayRequest.doRequest(obj_body, funcode,hwSubcontractor.getAppId(), hwSubcontractor.getPaymentAddress() + ":" + hwSubcontractor.getPaymentPort());
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
JSONObject jsonObject1 = jsonObject.getJSONObject("response");
|
|
|
JSONObject jsonObjectHead = jsonObject1.getJSONObject("head");
|
|
|
@@ -148,7 +148,7 @@ public class PayCommon {
|
|
|
}
|
|
|
}
|
|
|
obj_body.put("dbtacc", eacnbr); //付款账号
|
|
|
- obj_body.put("busmod", PayConst.busmod); //业务模式(测试固定:F00003)注意:测试环境/正式环境区分开
|
|
|
+ obj_body.put("busmod", hwSubcontractor.getBusinessMode()); //业务模式(测试固定:F00003)注意:测试环境/正式环境区分开
|
|
|
//业务参考号采用时间戳+三位随机数
|
|
|
Random random = new Random();
|
|
|
String code = "";
|
|
|
@@ -160,8 +160,8 @@ public class PayCommon {
|
|
|
obj_body.put("ttlamt", totalPayment); //总金额
|
|
|
obj_body.put("ttlcnt", payLength); //总笔数
|
|
|
obj_body.put("ccynbr", PayConst.ccynbr); //货币类型(人民币,默认为10)
|
|
|
- obj_body.put("trstyp", PayConst.trstyp); //交易代码(代发类型),默认代发其他
|
|
|
- obj_body.put("paycnv", PayConst.paycnv); //代发协议,默认
|
|
|
+ obj_body.put("trstyp", hwSubcontractor.getTrsType()); //交易代码(代发类型),默认代发其他
|
|
|
+ obj_body.put("paycnv", hwSubcontractor.getPayCnv()); //代发协议,默认
|
|
|
obj_body.put("trxrmk", "代发"); //用途
|
|
|
//代发明细
|
|
|
JSONArray trsreq = new JSONArray();
|
|
|
@@ -185,7 +185,7 @@ public class PayCommon {
|
|
|
trsreq.add(trs);
|
|
|
}
|
|
|
obj_body.put("trsreq", trsreq); //代发明细信息
|
|
|
- String result = PayRequest.doRequest(obj_body, funcode);
|
|
|
+ String result = PayRequest.doRequest(obj_body, funcode,hwSubcontractor.getAppId(), hwSubcontractor.getPaymentAddress() + ":" + hwSubcontractor.getPaymentPort());
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
JSONObject jsonObject1 = jsonObject.getJSONObject("response");
|
|
|
JSONObject jsonObjectHead = jsonObject1.getJSONObject("head");
|
|
|
@@ -204,7 +204,7 @@ public class PayCommon {
|
|
|
/**
|
|
|
* 移动代发每笔明细查询
|
|
|
*/
|
|
|
- public static JSONObject DCAGPDTL(HwPayRecord hwPayRecord) {
|
|
|
+ public static JSONObject DCAGPDTL(HwPayRecord hwPayRecord,HwSubcontractor hwSubcontractor) {
|
|
|
// body
|
|
|
JSONObject obj_body = new JSONObject();
|
|
|
//funcode接口名称
|
|
|
@@ -212,7 +212,7 @@ public class PayCommon {
|
|
|
obj_body.put("flwsid", hwPayRecord.getAgpseq()); //批次号码
|
|
|
obj_body.put("trssts", ""); //W:待交易S:成功E:失败,为空返回所有明细
|
|
|
obj_body.put("ctnkey", ""); //第一次传空,后续传响应报文中ctnkey字段值
|
|
|
- String result = PayRequest.doRequest(obj_body, funcode);
|
|
|
+ String result = PayRequest.doRequest(obj_body, funcode,hwSubcontractor.getAppId(), hwSubcontractor.getPaymentAddress() + ":" + hwSubcontractor.getPaymentPort());
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
JSONObject jsonObject1 = jsonObject.getJSONObject("response");
|
|
|
JSONObject jsonObjectHead = jsonObject1.getJSONObject("head");
|
|
|
@@ -230,6 +230,7 @@ public class PayCommon {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 弃用
|
|
|
* 代发经办(测试前置机)
|
|
|
*
|
|
|
* @param hwPaymentDetailList
|
|
|
@@ -253,7 +254,7 @@ public class PayCommon {
|
|
|
eacnbr = hwPayAccoutList.get(0).getEacnbr();
|
|
|
}
|
|
|
obj_body.put("dbtacc", eacnbr); //付款账号
|
|
|
- obj_body.put("busmod", PayConst.busmod); //业务模式(测试固定:F00003)注意:测试环境/正式环境区分开
|
|
|
+ obj_body.put("busmod", 1); //业务模式(测试固定:F00003)注意:测试环境/正式环境区分开
|
|
|
//业务参考号采用时间戳+三位随机数
|
|
|
Random random = new Random();
|
|
|
String code = "";
|
|
|
@@ -265,8 +266,8 @@ public class PayCommon {
|
|
|
obj_body.put("ttlamt", totalPayment); //总金额
|
|
|
obj_body.put("ttlcnt", payLength); //总笔数
|
|
|
obj_body.put("ccynbr", PayConst.ccynbr); //货币类型(人民币,默认为10)
|
|
|
- obj_body.put("trstyp", PayConst.trstyp); //交易代码(代发类型),默认代发其他
|
|
|
- obj_body.put("paycnv", PayConst.paycnv); //代发协议,默认
|
|
|
+ obj_body.put("trstyp", 1); //交易代码(代发类型),默认代发其他
|
|
|
+ obj_body.put("paycnv", 1); //代发协议,默认
|
|
|
obj_body.put("trxrmk", "代发"); //用途
|
|
|
//代发明细
|
|
|
JSONArray trsreq = new JSONArray();
|
|
|
@@ -290,7 +291,7 @@ public class PayCommon {
|
|
|
trsreq.add(trs);
|
|
|
}
|
|
|
obj_body.put("trsreq", trsreq); //代发明细信息
|
|
|
- String result = PayRequest.doRequest(obj_body, funcode);
|
|
|
+ String result = "";
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
JSONObject jsonObject1 = jsonObject.getJSONObject("response");
|
|
|
JSONObject jsonObjectHead = jsonObject1.getJSONObject("head");
|