提交代码

2.0-master
胡锐 7 months ago
parent a7c82de2c4
commit 7bfdcb2e74
  1. 10
      hai-order/src/main/java/com/web/controller/OrderPayNotifyController.java
  2. 5
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  3. 18
      hai-service/src/main/java/com/hai/pay/channel/huift/TradeService.java
  4. 8
      hai-service/src/main/java/com/hai/pay/channel/huift/config/HuiftConfig.java
  5. 6
      hai-service/src/main/resources/dev/commonConfig.properties
  6. 3
      hai-service/src/main/resources/prod/commonConfig.properties

@ -28,6 +28,8 @@ import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedMap;
/**
@ -138,7 +140,7 @@ public class OrderPayNotifyController {
if (StringUtils.isNotBlank(params)) {
// 参数解码
String paramsStr = URLDecoder.decode(params,"utf-8");
JSONObject body = JSONObject.parseObject(paramsStr.substring(0, paramsStr.length() - 1));
JSONObject body = JSONObject.parseObject(paramsStr);
log.info("开始处理订单: " + body.getString("outTradeNo"));
// 查询订单信息
@ -146,11 +148,13 @@ public class OrderPayNotifyController {
if (order != null && order.getOrderStatus().equals(OrderStatus.STATUS1.getNumber())) {
log.info("开始处理业务");
// 处理订单业务
Map<String,Object> other = new HashMap<>();
other.put("payChannelOrderNo", order.getPayChannelOrderNo());
paySuccessService.orderPaySuccessHandle(order.getOrderNo(),
OrderPayType.PAY_TYPE10,
body.getString("orderNo"),
body.getString("bankTraceNo"),
order.getPayPrice(),
null,null);
null,other);
}
log.info("处理业务完成");
}

@ -89,6 +89,11 @@ public class CommonSysConfig {
private String unionStagingPayOrgTermNo;
private String unionStagingPayNotifyUrl;
// 贵行V家园小程序支付
private String huiftReqUrl;
private String huiftShopCode;
private String huiftSignSecret;
private String wx_cert;
private String telApiKey;

@ -10,6 +10,7 @@ import com.hai.entity.HighOrder;
import com.hai.entity.HighOrderRefund;
import com.hai.enum_type.OrderStatusEnum;
import com.hai.order.type.OrderPayType;
import com.hai.order.type.OrderProductType;
import com.hai.pay.channel.huift.config.HuiftConfig;
import com.hai.service.HighOrderService;
import org.springframework.stereotype.Component;
@ -45,7 +46,22 @@ public class TradeService {
param.put("callbackUrl", CommonSysConst.getSysConfig().getHsgDomainName() + "/order/payNotify/huiftPay");
// param.put("remark", ""); // 备注
// param.put("outAppId", "");
// param.put("outRedirectPath", "");
if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE12.getNumber())) {
param.put("outRedirectPath", CommonSysConst.getSysConfig().getHsgDomainName()+"/hsgH5?accountId=0000016&key=&code=/physical-merchants/classify/order/orderDetail?id=" + order.getOrderNo());
} else if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE5.getNumber())) {
param.put("outRedirectPath", CommonSysConst.getSysConfig().getHsgDomainName()+"/hsgH5?accountId=0000016&key=&code=/pages/pay/success/success?id=" + order.getOrderNo());
} else if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE1.getNumber()) || order.getProductType().equals(OrderProductType.PRODUCT_TYPE2.getNumber())) {
param.put("outRedirectPath", CommonSysConst.getSysConfig().getHsgDomainName()+"/hsgH5?accountId=0000016&key=&code=/gianzhu-KFC/order-details/order-details?id=" + order.getOrderNo());
} else {
param.put("outRedirectPath", CommonSysConst.getSysConfig().getHsgDomainName()+"/hsgH5?accountId=0000016&key=&code=/pages/user/order_details/order_details?id=" + order.getOrderNo());
}
param.put("sign", HuiftConfig.md5Encode(HuiftConfig.paramSort(param, HuiftConfig.signSecret).getBytes()).toLowerCase());
JSONObject response = HttpsUtils.doPost(HuiftConfig.reqUrl + "/hfq/v1/thirdPay/thirdPreOrder", JSONObject.toJSONString(param));
if (response.getString("status").equals("ok")) {

@ -1,5 +1,7 @@
package com.hai.pay.channel.huift.config;
import com.hai.config.CommonSysConfig;
import com.hai.config.CommonSysConst;
import org.apache.commons.lang3.StringUtils;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
@ -15,9 +17,9 @@ import java.util.Set;
**/
public class HuiftConfig {
public final static String reqUrl = "https://linktest.huift.com.cn";
public final static String shopcode = "50041b27-f985-dcb0-1cc0-f106b09bf1fe";
public final static String signSecret = "DB4D8069A9AC6DDF9D75667EE5CF182A";
public final static String reqUrl = CommonSysConst.getSysConfig().getHuiftReqUrl();
public final static String shopcode = CommonSysConst.getSysConfig().getHuiftShopCode();
public final static String signSecret = CommonSysConst.getSysConfig().getHuiftSignSecret();
/**
* 参数排序

@ -57,6 +57,12 @@ huiliantongSinopecDistributorId=aNId4A3X
huiliantongDistributorId=1JnL8YMV
huiliantongSinopecUrl=fuelCoupons
huiftReqUrl=https://gzyhmp.huift.com.cn
huiftShopCode=20240653-59c4-4181-9157-17fd4b95c3fc
huiftSignSecret=19C17F9E19B8DDDDF2FD2EE4EA9F6C61
HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json
HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE
HuiLianTongUnionCardSignCode=F8E91A3C

@ -101,6 +101,9 @@ HgApiKey=3fd74e7c16b04681a0f481c5bc0a96d3
HgMemberId=1622808562621276161
HgPostUrl=http://113.250.49.100:8088/recharge/
huiftReqUrl=https://gzyhmp.huift.com.cn
huiftShopCode=20240653-59c4-4181-9157-17fd4b95c3fc
huiftSignSecret=19C17F9E19B8DDDDF2FD2EE4EA9F6C61
#CY
CyApiKey=cyMYLABWa2H2u

Loading…
Cancel
Save