dev-discount
袁野 3 years ago
commit 3c31106ddd
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 14
      hai-service/src/main/java/com/hai/config/UnionPayConfig.java
  3. 2
      hai-service/src/main/resources/dev/commonConfig.properties
  4. 10
      hai-service/src/main/resources/prod/commonConfig.properties

@ -259,7 +259,7 @@ public class HighTestController {
@RequestMapping(value = "/unionPay", method = RequestMethod.GET) @RequestMapping(value = "/unionPay", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "银联支付") @ApiOperation(value = "银联支付")
public ResponseData unionPay(@RequestParam(name = "merchantId", required = true) Long merchantId) { public ResponseData unionPay() {
try { try {
return ResponseMsgUtil.success(UnionPayConfig.upPreOrder("HF"+System.currentTimeMillis(), new BigDecimal("1"), "test")); return ResponseMsgUtil.success(UnionPayConfig.upPreOrder("HF"+System.currentTimeMillis(), new BigDecimal("1"), "test"));
} catch (Exception e) { } catch (Exception e) {

@ -16,6 +16,20 @@ import java.util.*;
*/ */
public class UnionPayConfig { public class UnionPayConfig {
/**
* 注意请勿随意调用会更新签名秘钥会导致接口签名错误
* 更新并获取签名密钥
* 文档地址 https://doc.eycard.cn/web/#/42?page_id=542
* @return 响应信息
* @throws Exception
*/
private static JSONObject getSign() throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("channelid", CommonSysConst.getSysConfig().getUnionPayChannelid());
paramMap.put("opt", "getSign");
return HttpsUtils.doPostForm(CommonSysConst.getSysConfig().getUnionPayUrl(), generateRequestParam(paramMap), new HashMap<>());
}
/** /**
* APP控件支付 * APP控件支付
* 文档地址 https://doc.eycard.cn/web/#/42?page_id=1516 * 文档地址 https://doc.eycard.cn/web/#/42?page_id=1516

@ -29,7 +29,7 @@ unionPayChannelid=D01X66666666761
unionPayMerid=531000012972390 unionPayMerid=531000012972390
unionPayTermid=W1489519 unionPayTermid=W1489519
unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5 unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5
unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify unionPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/notify
# ?????? # ??????
wx_cert=/home/project/wx_cert/ wx_cert=/home/project/wx_cert/

@ -19,11 +19,11 @@ HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json
HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE
HuiLianTongUnionCardSignCode=F8E91A3C HuiLianTongUnionCardSignCode=F8E91A3C
unionPayUrl=https://notify-test.eycard.cn:7443/WorthTech_Access_AppPaySystemV2/apppayacc unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc
unionPayChannelid=D01X66666666761 unionPayChannelid=D01X00000801226
unionPayMerid=531000012972390 unionPayMerid=531000009488145
unionPayTermid=W1489519 unionPayTermid=39339061
unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5 unionPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify
wx_cert=/home/project/wx_cert/ wx_cert=/home/project/wx_cert/

Loading…
Cancel
Save