diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index b63839df..1a16872e 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -259,7 +259,7 @@ public class HighTestController { @RequestMapping(value = "/unionPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "银联支付") - public ResponseData unionPay(@RequestParam(name = "merchantId", required = true) Long merchantId) { + public ResponseData unionPay() { try { return ResponseMsgUtil.success(UnionPayConfig.upPreOrder("HF"+System.currentTimeMillis(), new BigDecimal("1"), "test")); } catch (Exception e) { diff --git a/hai-service/src/main/java/com/hai/config/UnionPayConfig.java b/hai-service/src/main/java/com/hai/config/UnionPayConfig.java index e30371b7..dfa59b5d 100644 --- a/hai-service/src/main/java/com/hai/config/UnionPayConfig.java +++ b/hai-service/src/main/java/com/hai/config/UnionPayConfig.java @@ -16,6 +16,20 @@ import java.util.*; */ public class UnionPayConfig { + /** + * 【注意】请勿随意调用,会更新签名秘钥。会导致接口签名错误 + * 更新并获取签名密钥 + * 文档地址: https://doc.eycard.cn/web/#/42?page_id=542 + * @return 响应信息 + * @throws Exception + */ + private static JSONObject getSign() throws Exception { + Map paramMap = new HashMap<>(); + paramMap.put("channelid", CommonSysConst.getSysConfig().getUnionPayChannelid()); + paramMap.put("opt", "getSign"); + return HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getUnionPayUrl(), generateRequestParam(paramMap), new HashMap<>()); + } + /** * APP控件支付 * 文档地址: https://doc.eycard.cn/web/#/42?page_id=1516 diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 15606769..0732f63d 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -29,7 +29,7 @@ unionPayChannelid=D01X66666666761 unionPayMerid=531000012972390 unionPayTermid=W1489519 unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5 -unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify +unionPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/notify # ?????? wx_cert=/home/project/wx_cert/ diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index ed2624ec..72481721 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -19,11 +19,11 @@ HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE HuiLianTongUnionCardSignCode=F8E91A3C -unionPayUrl=https://notify-test.eycard.cn:7443/WorthTech_Access_AppPaySystemV2/apppayacc -unionPayChannelid=D01X66666666761 -unionPayMerid=531000012972390 -unionPayTermid=W1489519 -unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5 +unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc +unionPayChannelid=D01X00000801226 +unionPayMerid=531000009488145 +unionPayTermid=39339061 +unionPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0 unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify wx_cert=/home/project/wx_cert/