|
|
|
@ -77,7 +77,7 @@ public class TestController { |
|
|
|
|
reqBody.put("outTradeNo", DateUtil.date2String(new Date(),DateUtil.YMDHMS)+ IDGenerator.nextId(2)); |
|
|
|
|
reqBody.put("totalAmount", "1.5"); |
|
|
|
|
reqBody.put("subject", "测试交易"); |
|
|
|
|
reqBody.put("notifyUrl", "https://gratia-pay.dctpay.com/openApi/v1/payNotify/test"); |
|
|
|
|
reqBody.put("notifyUrl", "https://pay.dctpay.com/openApi/v1/payNotify/test"); |
|
|
|
|
reqBody.put("transType", transType);//"NATIVE" "JSAP I"
|
|
|
|
|
reqBody.put("payMode", payMode); // WECHAT ALIPAY UQRCODEPAY
|
|
|
|
|
reqBody.put("profitSharing", 0); |
|
|
|
@ -106,7 +106,7 @@ public class TestController { |
|
|
|
|
reqBody.put("outSplitInfo", outSplitInfoList);*/ |
|
|
|
|
reqBody.put("sign", SignatureUtil.createSign(reqBody,merKeyService.getKeyByMerNo(MapUtils.getString(reqBody,"merchantNo")))); |
|
|
|
|
|
|
|
|
|
JSONObject object = HttpsUtils.doPost("http://localhost:9605/openApi/v1/trade/preorder", JSONObject.parseObject(JSONObject.toJSONString(reqBody))); |
|
|
|
|
JSONObject object = HttpsUtils.doPost("https://pay.dctpay.com/openApi/v1/trade/preorder", JSONObject.parseObject(JSONObject.toJSONString(reqBody))); |
|
|
|
|
log.info("返回参数:" + JSONObject.toJSONString(object)); |
|
|
|
|
return object; |
|
|
|
|
|
|
|
|
@ -148,18 +148,20 @@ public class TestController { |
|
|
|
|
outSplitInfo1.put("outSubTradeNo", MapUtils.getString(reqBody,"outTradeNo")+"_1"); |
|
|
|
|
outSplitInfo1.put("merchantNo", "2023041916292112804"); |
|
|
|
|
outSplitInfo1.put("amount", "1"); |
|
|
|
|
outSplitInfo1.put("subAttach", "参数子附加参数1"); |
|
|
|
|
outSplitInfoList.add(outSplitInfo1); |
|
|
|
|
|
|
|
|
|
Map<String,Object> outSplitInfo2 = new HashMap<>(); |
|
|
|
|
outSplitInfo2.put("outSubTradeNo", MapUtils.getString(reqBody,"outTradeNo")+"_2"); |
|
|
|
|
outSplitInfo2.put("merchantNo", "2024061217292423201"); |
|
|
|
|
outSplitInfo2.put("amount", "0.5"); |
|
|
|
|
outSplitInfo2.put("subAttach", "参数子附加参数2"); |
|
|
|
|
outSplitInfoList.add(outSplitInfo2); |
|
|
|
|
|
|
|
|
|
reqBody.put("outSplitInfo", outSplitInfoList); |
|
|
|
|
reqBody.put("sign", SignatureUtil.createSign(reqBody,merKeyService.getKeyByMerNo(MapUtils.getString(reqBody,"merchantNo")))); |
|
|
|
|
|
|
|
|
|
JSONObject object = HttpsUtils.doPost("http://localhost:9605/openApi/v1/trade/merge/preorder", JSONObject.parseObject(JSONObject.toJSONString(reqBody))); |
|
|
|
|
JSONObject object = HttpsUtils.doPost("https://pay.dctpay.com/openApi/v1/trade/merge/preorder", JSONObject.parseObject(JSONObject.toJSONString(reqBody))); |
|
|
|
|
log.info("返回参数:" + JSONObject.toJSONString(object)); |
|
|
|
|
return object; |
|
|
|
|
|
|
|
|
|