|
|
|
@ -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")) { |
|
|
|
|