|
|
@ -28,7 +28,7 @@ public class HuiPayService { |
|
|
|
static Logger log = LoggerFactory.getLogger(HuiPayService.class); |
|
|
|
static Logger log = LoggerFactory.getLogger(HuiPayService.class); |
|
|
|
// 请求地址
|
|
|
|
// 请求地址
|
|
|
|
private final static String REQUEST_URL = "https://pay.dctpay.com/openApi/v1/"; |
|
|
|
private final static String REQUEST_URL = "https://pay.dctpay.com/openApi/v1/"; |
|
|
|
private final static String DEFAULT_MER_NO = "2023041916292112804"; |
|
|
|
public final static String DEFAULT_MER_NO = "2023041916292112804"; |
|
|
|
private final static String DEFAULT_MER_KEY = "2jLO2WjXcSRSzTCaca0Kmv0OFrfYBbrA"; |
|
|
|
private final static String DEFAULT_MER_KEY = "2jLO2WjXcSRSzTCaca0Kmv0OFrfYBbrA"; |
|
|
|
|
|
|
|
|
|
|
|
public static Map<Object, Object> preorder(String openId,OrderModel order) throws Exception { |
|
|
|
public static Map<Object, Object> preorder(String openId,OrderModel order) throws Exception { |
|
|
@ -82,10 +82,10 @@ public class HuiPayService { |
|
|
|
|
|
|
|
|
|
|
|
public static JSONObject refund(String merchantNo,String outTradeNo,String refundTradeNo, BigDecimal refundAmount) throws Exception { |
|
|
|
public static JSONObject refund(String merchantNo,String outTradeNo,String refundTradeNo, BigDecimal refundAmount) throws Exception { |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
param.put("merchantNo", ""); |
|
|
|
param.put("merchantNo", merchantNo); |
|
|
|
param.put("outTradeNo", ""); |
|
|
|
param.put("outTradeNo", outTradeNo); |
|
|
|
param.put("refundTradeNo", ""); |
|
|
|
param.put("refundTradeNo", refundTradeNo); |
|
|
|
param.put("refundAmount", ""); |
|
|
|
param.put("refundAmount", refundAmount); |
|
|
|
param.put("sign" , SignatureUtil.createSign(param, DEFAULT_MER_KEY)); |
|
|
|
param.put("sign" , SignatureUtil.createSign(param, DEFAULT_MER_KEY)); |
|
|
|
return HttpsUtils.doPost(REQUEST_URL + "trade/refund", param, new HashMap<>()); |
|
|
|
return HttpsUtils.doPost(REQUEST_URL + "trade/refund", param, new HashMap<>()); |
|
|
|
|
|
|
|
|
|
|
|