Commit a73f5574 authored by Wzp's avatar Wzp

H5支付

parent a0aa1b11
...@@ -6,10 +6,13 @@ import com.alipay.api.AlipayConfig; ...@@ -6,10 +6,13 @@ import com.alipay.api.AlipayConfig;
import com.alipay.api.DefaultAlipayClient; import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayTradePagePayModel; import com.alipay.api.domain.AlipayTradePagePayModel;
import com.alipay.api.domain.AlipayTradeRefundModel; import com.alipay.api.domain.AlipayTradeRefundModel;
import com.alipay.api.domain.AlipayTradeWapPayModel;
import com.alipay.api.request.AlipayTradePagePayRequest; import com.alipay.api.request.AlipayTradePagePayRequest;
import com.alipay.api.request.AlipayTradeRefundRequest; import com.alipay.api.request.AlipayTradeRefundRequest;
import com.alipay.api.request.AlipayTradeWapPayRequest;
import com.alipay.api.response.AlipayTradePagePayResponse; import com.alipay.api.response.AlipayTradePagePayResponse;
import com.alipay.api.response.AlipayTradeRefundResponse; import com.alipay.api.response.AlipayTradeRefundResponse;
import com.alipay.api.response.AlipayTradeWapPayResponse;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.hezhi.domain.TbMemberOrder; import com.ruoyi.hezhi.domain.TbMemberOrder;
import com.ruoyi.hezhi.service.ITbMemberOrderService; import com.ruoyi.hezhi.service.ITbMemberOrderService;
...@@ -25,6 +28,7 @@ import java.util.Map; ...@@ -25,6 +28,7 @@ import java.util.Map;
/** /**
* 支付宝支付 * 支付宝支付
*
* @author Wzp * @author Wzp
*/ */
@Component @Component
...@@ -52,12 +56,13 @@ public class AlipayService { ...@@ -52,12 +56,13 @@ public class AlipayService {
/** /**
* 支付宝支付生成预付单 * 支付宝支付生成预付单
*
* @param realPay 支付金额 * @param realPay 支付金额
* @param paySn 支付单号 * @param paySn 支付单号
* @param description 描述 * @param description 描述
* @return 结果 * @return 结果
*/ */
public String aliPaySubmit(BigDecimal realPay, String paySn, String description,Long examId,Long memberUserId) { public String aliPaySubmit(BigDecimal realPay, String paySn, String description, Long examId, Long memberUserId) {
try { try {
// 初始化SDK // 初始化SDK
AlipayClient alipayClient = getAlipayClient(); AlipayClient alipayClient = getAlipayClient();
...@@ -71,20 +76,59 @@ public class AlipayService { ...@@ -71,20 +76,59 @@ public class AlipayService {
model.setProductCode("FAST_INSTANT_TRADE_PAY");// 设置产品码 model.setProductCode("FAST_INSTANT_TRADE_PAY");// 设置产品码
model.setQrPayMode("1");// 设置PC扫码支付的方式 model.setQrPayMode("1");// 设置PC扫码支付的方式
model.setQrcodeWidth(100L);// 设置商户自定义二维码宽度 model.setQrcodeWidth(100L);// 设置商户自定义二维码宽度
model.setRequestFromUrl("https://www.chsie.com.cn/payTheFees?examId="+examId+"&memberUserId="+memberUserId); model.setRequestFromUrl("https://www.chsie.com.cn/payTheFees?examId=" + examId + "&memberUserId=" + memberUserId);
request.setBizModel(model); request.setBizModel(model);
request.setNotifyUrl(aliPayConfig.getNotifyUrl()+"/api/pay/aliPayBoilerNotify"); request.setNotifyUrl(aliPayConfig.getNotifyUrl() + "/api/pay/aliPayBoilerNotify");
// request.setReturnUrl("https://www.chsie.com.cn/examDetail?examId="+examId);//支付成功后跳转回哪个页面 // request.setReturnUrl("https://www.chsie.com.cn/examDetail?examId="+examId);//支付成功后跳转回哪个页面
AlipayTradePagePayResponse response = alipayClient.pageExecute(request, "POST"); AlipayTradePagePayResponse response = alipayClient.pageExecute(request, "POST");
// 如果需要返回GET请求,请使用 // 如果需要返回GET请求,请使用
if (response.isSuccess()){ if (response.isSuccess()) {
return response.getBody(); return response.getBody();
}else { } else {
throw new ServerCloneException("支付宝支付失败"); throw new ServerCloneException("支付宝支付失败");
} }
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace();
throw new ServiceException("支付宝支付异常");
}
}
/**
* 支付宝支付生成预付单-H5
*
* @param realPay 支付金额
* @param paySn 支付单号
* @param description 描述
* @return 结果
*/
public String aliPayH5Submit(BigDecimal realPay, String paySn, String description, Long examId, Long memberUserId) {
try {
// 初始化SDK
AlipayClient alipayClient = getAlipayClient();
// 构造请求参数以调用接口
AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest();
AlipayTradeWapPayModel model = new AlipayTradeWapPayModel();
model.setOutTradeNo(paySn);// 设置商户订单号
model.setTotalAmount(realPay.toString());// 设置订单总金额
model.setSubject(description);// 设置订单标题
model.setProductCode("QUICK_WAP_WAY");// 设置产品码
model.setQuitUrl("https://h5.chsie.com.cn/#/subPages/examDetailsIndex/examDetailsIndex?examNoticeId="+examId);
request.setBizModel(model);
request.setNotifyUrl(aliPayConfig.getNotifyUrl() + "/api/pay/aliPayBoilerNotify");
request.setReturnUrl("https://h5.chsie.com.cn/#/subPages/examDetailsIndex/examDetailsIndex?examNoticeId="+examId);
AlipayTradeWapPayResponse response = alipayClient.pageExecute(request, "POST");
// 如果需要返回GET请求,请使用
if (response.isSuccess()) {
return response.getBody();
} else {
throw new ServerCloneException("支付宝支付失败");
}
} catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new ServiceException("支付宝支付异常"); throw new ServiceException("支付宝支付异常");
} }
...@@ -92,6 +136,7 @@ public class AlipayService { ...@@ -92,6 +136,7 @@ public class AlipayService {
/** /**
* 支付宝退款 * 支付宝退款
*
* @param orderSn 订单号 * @param orderSn 订单号
* @param payment 支付金额 * @param payment 支付金额
* @return 结果 * @return 结果
...@@ -112,14 +157,14 @@ public class AlipayService { ...@@ -112,14 +157,14 @@ public class AlipayService {
request.setBizModel(refundModel); request.setBizModel(refundModel);
AlipayTradeRefundResponse response = alipayClient.certificateExecute(request); AlipayTradeRefundResponse response = alipayClient.certificateExecute(request);
if (response.isSuccess()){ if (response.isSuccess()) {
log.info("支付宝退款调用成功" + response); log.info("支付宝退款调用成功" + response);
return "SUCCESS"; return "SUCCESS";
}else{ } else {
log.error("支付宝退款调用失败" + response); log.error("支付宝退款调用失败" + response);
return "FAIL"; return "FAIL";
} }
}catch(Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
log.error("支付宝退款错误!", e.getMessage()); log.error("支付宝退款错误!", e.getMessage());
return "FAIL"; return "FAIL";
...@@ -128,6 +173,7 @@ public class AlipayService { ...@@ -128,6 +173,7 @@ public class AlipayService {
/** /**
* 校验回调参数 * 校验回调参数
*
* @param params 参数 * @param params 参数
* @return * @return
*/ */
...@@ -141,7 +187,7 @@ public class AlipayService { ...@@ -141,7 +187,7 @@ public class AlipayService {
} }
// 验证商户app_id // 验证商户app_id
String appId = params.get("app_id"); String appId = params.get("app_id");
if(! appId.equals(aliPayConfig.getAppId())){ if (!appId.equals(aliPayConfig.getAppId())) {
log.error("app_id 错误"); log.error("app_id 错误");
return "FAIL"; return "FAIL";
} }
......
...@@ -7,6 +7,7 @@ import com.alipay.api.internal.util.AlipaySignature; ...@@ -7,6 +7,7 @@ import com.alipay.api.internal.util.AlipaySignature;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ip.IpUtils;
import com.ruoyi.common.weixin.config.WeiXinPayConfig; import com.ruoyi.common.weixin.config.WeiXinPayConfig;
import com.ruoyi.common.weixin.utils.WeiXinPayV3Utils; import com.ruoyi.common.weixin.utils.WeiXinPayV3Utils;
import com.ruoyi.hezhi.api.entity.AliPayConfig; import com.ruoyi.hezhi.api.entity.AliPayConfig;
...@@ -45,7 +46,6 @@ public class ApiPayController { ...@@ -45,7 +46,6 @@ public class ApiPayController {
@Resource @Resource
private WeiXinPayV3Utils weiXinPayV3Utils; private WeiXinPayV3Utils weiXinPayV3Utils;
@Resource @Resource
private AliPayConfig aliPayConfig; private AliPayConfig aliPayConfig;
@Resource @Resource
...@@ -67,7 +67,7 @@ public class ApiPayController { ...@@ -67,7 +67,7 @@ public class ApiPayController {
return AjaxResult.error("参数错误"); return AjaxResult.error("参数错误");
} }
ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo); ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo);
if(examPayInfoDto!=null&&examPayInfoDto.getIsExpired()==1){ if (examPayInfoDto != null && examPayInfoDto.getIsExpired() == 1) {
return AjaxResult.error("考试报名时间已过,请重新报名"); return AjaxResult.error("考试报名时间已过,请重新报名");
} }
TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo); TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo);
...@@ -78,11 +78,11 @@ public class ApiPayController { ...@@ -78,11 +78,11 @@ public class ApiPayController {
BigDecimal payPrice = order.getPayPrice(); BigDecimal payPrice = order.getPayPrice();
if (payPrice.compareTo(BigDecimal.ZERO) < 1){ if (payPrice.compareTo(BigDecimal.ZERO) < 1) {
// 无需支付 // 无需支付
result.put("isNeedPay", 0); result.put("isNeedPay", 0);
memberOrderService.orderPayNotify(order.getOrderNo(), 2); memberOrderService.orderPayNotify(order.getOrderNo(), 2);
}else { } else {
// 需要支付 // 需要支付
result.put("isNeedPay", 1); result.put("isNeedPay", 1);
log.info("支付宝预下单,商户订单号:{}", orderNo); log.info("支付宝预下单,商户订单号:{}", orderNo);
...@@ -91,7 +91,51 @@ public class ApiPayController { ...@@ -91,7 +91,51 @@ public class ApiPayController {
if (ObjectUtil.isNull(tbExamRegistration)) { if (ObjectUtil.isNull(tbExamRegistration)) {
return AjaxResult.error("获取报名信息失败,下单失败"); return AjaxResult.error("获取报名信息失败,下单失败");
} }
String payInfo = alipayService.aliPaySubmit(order.getPayPrice(), order.getOrderNo(), order.getOrderName(),tbExamRegistration.getExamId(),tbExamRegistration.getMemberUserId()); String payInfo = alipayService.aliPaySubmit(order.getPayPrice(), order.getOrderNo(), order.getOrderName(), tbExamRegistration.getExamId(), tbExamRegistration.getMemberUserId());
result.put("payInfo", payInfo);
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("下单失败");
}
}
return AjaxResult.success(result);
}
/**
* alipayH5支付
*/
@GetMapping("/aliPayH5")
public AjaxResult aliPayH5(String orderNo) {
//todo 检测考试报名时间是否过了(支付宝)【待测试】
if (StrUtil.isBlank(orderNo)) {
return AjaxResult.error("参数错误");
}
ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo);
if (examPayInfoDto != null && examPayInfoDto.getIsExpired() == 1) {
return AjaxResult.error("考试报名时间已过,请重新报名");
}
TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo);
if (ObjectUtils.isEmpty(order)) {
return AjaxResult.error("参数错误");
}
JSONObject result = new JSONObject();
BigDecimal payPrice = order.getPayPrice();
if (payPrice.compareTo(BigDecimal.ZERO) < 1) {
// 无需支付
result.put("isNeedPay", 0);
memberOrderService.orderPayNotify(order.getOrderNo(), 2);
} else {
// 需要支付
result.put("isNeedPay", 1);
log.info("支付宝预下单,商户订单号:{}", orderNo);
try {
TbExamRegistration tbExamRegistration = examRegistrationService.selectTbExamRegistrationByExamRegistrationIdFahuo(order.getDataId());
if (ObjectUtil.isNull(tbExamRegistration)) {
return AjaxResult.error("获取报名信息失败,下单失败");
}
String payInfo = alipayService.aliPayH5Submit(order.getPayPrice(), order.getOrderNo(), order.getOrderName(), tbExamRegistration.getExamId(), tbExamRegistration.getMemberUserId());
result.put("payInfo", payInfo); result.put("payInfo", payInfo);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -113,7 +157,7 @@ public class ApiPayController { ...@@ -113,7 +157,7 @@ public class ApiPayController {
throw new ServiceException("参数错误"); throw new ServiceException("参数错误");
} }
ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo); ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo);
if(examPayInfoDto!=null&&examPayInfoDto.getIsExpired()==1){ if (examPayInfoDto != null && examPayInfoDto.getIsExpired() == 1) {
return AjaxResult.error("考试报名时间已过,请重新报名"); return AjaxResult.error("考试报名时间已过,请重新报名");
} }
TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo); TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo);
...@@ -123,13 +167,13 @@ public class ApiPayController { ...@@ -123,13 +167,13 @@ public class ApiPayController {
BigDecimal payPrice = order.getPayPrice(); BigDecimal payPrice = order.getPayPrice();
if(payPrice.compareTo(BigDecimal.ZERO) < 1) { if (payPrice.compareTo(BigDecimal.ZERO) < 1) {
// 无需支付 // 无需支付
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
data.put("isNeedPay", 0); data.put("isNeedPay", 0);
memberOrderService.orderPayNotify(orderNo, 1); memberOrderService.orderPayNotify(orderNo, 1);
return AjaxResult.success(data); return AjaxResult.success(data);
}else { } else {
JSONObject amount = new JSONObject(); JSONObject amount = new JSONObject();
//单位为人民币(分) //单位为人民币(分)
amount.put("total", order.getPayPrice().multiply(new BigDecimal("100")).intValue()); amount.put("total", order.getPayPrice().multiply(new BigDecimal("100")).intValue());
...@@ -161,8 +205,77 @@ public class ApiPayController { ...@@ -161,8 +205,77 @@ public class ApiPayController {
} }
} }
/***
* 获取微信支付H5
* @param orderNo 订单号
* @return 结果
*/
@GetMapping("/createH5PayParam")
public AjaxResult createH5PayParam(String orderNo) {
//todo 检测考试报名时间是否过了(微信)【待测试】
if (StrUtil.isBlank(orderNo)) {
throw new ServiceException("参数错误");
}
ExamPayInfoDto examPayInfoDto = memberOrderService.selectExamPayInfoByOrderNo(orderNo);
if (examPayInfoDto != null && examPayInfoDto.getIsExpired() == 1) {
return AjaxResult.error("考试报名时间已过,请重新报名");
}
TbMemberOrder order = memberOrderService.selectOrderByOrderNo(orderNo);
if (ObjectUtils.isEmpty(order)) {
throw new ServiceException("订单错误");
}
BigDecimal payPrice = order.getPayPrice();
if (payPrice.compareTo(BigDecimal.ZERO) < 1) {
// 无需支付
JSONObject data = new JSONObject();
data.put("isNeedPay", 0);
memberOrderService.orderPayNotify(orderNo, 1);
return AjaxResult.success(data);
} else {
//单位为人民币(分)
JSONObject amount = new JSONObject();
amount.put("total", order.getPayPrice().multiply(new BigDecimal("100")).intValue());
amount.put("currency", "CNY");
// H5场景信息
JSONObject h5_info = new JSONObject();
amount.put("type", "Wap");// 场景类型,使用H5支付的场景:Wap、iOS、Android
// 场景信息
JSONObject scene_info = new JSONObject();
amount.put("payer_client_ip  ", IpUtils.getIpAddr());
amount.put("h5_info  ", h5_info);
JSONObject postData = new JSONObject();
postData.put("appid", weiXinPayConfig.getAppId());
postData.put("mchid", weiXinPayConfig.getMchId());
postData.put("description", order.getRemarks());
postData.put("out_trade_no", orderNo);
postData.put("notify_url", weiXinPayConfig.getH5NotifyUrl());
postData.put("amount", amount);
postData.put("scene_info", scene_info);
log.info("H5下单-参数 => {}", postData.toJSONString());
// 发送请求
JSONObject result = weiXinPayV3Utils.sendPost("https://api.mch.weixin.qq.com/v3/pay/transactions/h5", postData);
log.info("H5下单-结果 => {}", postData.toJSONString());
if (result.containsKey("h5_url")) {
// 支付二维码
Map<String, Object> map = new HashMap<>();
map.put("h5_url", result.getString("h5_url"));
map.put("isNeedPay", 1);
return AjaxResult.success(map);
} else {
log.error("H5下单调起失败 <{}> 参数:{},结果:{}", DateUtils.getTime(), postData.toJSONString(), result.toJSONString());
throw new ServiceException("H5下单调起失败");
}
}
}
/** /**
* 微信支付二维码支付回调 * 微信支付回调
* *
* @param httpServletRequest 请求 * @param httpServletRequest 请求
* @param httpServletResponse 响应 * @param httpServletResponse 响应
...@@ -216,54 +329,55 @@ public class ApiPayController { ...@@ -216,54 +329,55 @@ public class ApiPayController {
/** /**
* 支付宝支付回调-学信考试支付 * 支付宝支付回调-学信考试支付
*
* @param httpServletRequest 请求 * @param httpServletRequest 请求
* @param httpServletResponse 响应 * @param httpServletResponse 响应
*/ */
@PostMapping("/aliPayBoilerNotify") @PostMapping("/aliPayBoilerNotify")
@ResponseBody @ResponseBody
public String aliPayBoilerNotify(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse){ public String aliPayBoilerNotify(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
try { try {
//获取支付宝POST过来反馈信息 //获取支付宝POST过来反馈信息
//获取支付宝POST过来反馈信息,将异步通知中收到的待验证所有参数都存放到map中 //获取支付宝POST过来反馈信息,将异步通知中收到的待验证所有参数都存放到map中
Map< String , String > params = new HashMap< String , String >(); Map<String, String> params = new HashMap<String, String>();
Map requestParams = httpServletRequest.getParameterMap(); Map requestParams = httpServletRequest.getParameterMap();
for(Iterator iter = requestParams.keySet().iterator(); iter.hasNext();){ for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext(); ) {
String name = (String)iter.next(); String name = (String) iter.next();
String[] values = (String [])requestParams.get(name); String[] values = (String[]) requestParams.get(name);
String valueStr = ""; String valueStr = "";
for(int i = 0;i < values.length;i ++ ){ for (int i = 0; i < values.length; i++) {
valueStr = (i==values.length-1)?valueStr + values [i]:valueStr + values[i] + ","; valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
} }
//乱码解决,这段代码在出现乱码时使用。 //乱码解决,这段代码在出现乱码时使用。
//valueStr = new String(valueStr.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //valueStr = new String(valueStr.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
params.put (name,valueStr); params.put(name, valueStr);
} }
log.error("支付宝支付回调-学信考试支付 <{}> 订单参数 <{}> ", DateUtils.getTime(), params); log.error("支付宝支付回调-学信考试支付 <{}> 订单参数 <{}> ", DateUtils.getTime(), params);
boolean flag = AlipaySignature.rsaCheckV1 (params, aliPayConfig.getPublicKey(), "UTF-8","RSA2"); boolean flag = AlipaySignature.rsaCheckV1(params, aliPayConfig.getPublicKey(), "UTF-8", "RSA2");
if (flag){ if (flag) {
// 对支付结果中的业务进行验证 // 对支付结果中的业务进行验证
String s = alipayService.checkParams(params); String s = alipayService.checkParams(params);
if (s.equals("success")){ if (s.equals("success")) {
log.error("支付宝支付回调-学信考试支付 <{}> 签名认证成功 <{}> ", DateUtils.getTime(), params); log.error("支付宝支付回调-学信考试支付 <{}> 签名认证成功 <{}> ", DateUtils.getTime(), params);
String orderNo = params.get("out_trade_no"); String orderNo = params.get("out_trade_no");
// 业务处理 // 业务处理
String msg = ""; String msg = "";
try { try {
msg = memberOrderService.orderPayNotify(orderNo, 2); msg = memberOrderService.orderPayNotify(orderNo, 2);
}catch (Exception e){ } catch (Exception e) {
log.error("支付宝支付回调-学信考试支付<{}> 订单号 <{}> 订单处理异常", DateUtils.getTime(), orderNo); log.error("支付宝支付回调-学信考试支付<{}> 订单号 <{}> 订单处理异常", DateUtils.getTime(), orderNo);
msg = "FAIL"; msg = "FAIL";
} }
if(msg.equals("SUCCESS")){ if (msg.equals("SUCCESS")) {
return "success"; return "success";
}else{ } else {
return "fail"; return "fail";
} }
}else{ } else {
log.error("支付宝支付回调-学信考试支付 <{}> 签名认证失败 <{}> ", DateUtils.getTime(), params); log.error("支付宝支付回调-学信考试支付 <{}> 签名认证失败 <{}> ", DateUtils.getTime(), params);
return "fail"; return "fail";
} }
}else{ } else {
log.error("支付宝支付回调-学信考试支付 <{}> 解密失败 <{}> ", DateUtils.getTime(), params); log.error("支付宝支付回调-学信考试支付 <{}> 解密失败 <{}> ", DateUtils.getTime(), params);
return "fail"; return "fail";
} }
...@@ -290,7 +404,7 @@ public class ApiPayController { ...@@ -290,7 +404,7 @@ public class ApiPayController {
} }
@GetMapping("/test") @GetMapping("/test")
public AjaxResult test(){ public AjaxResult test() {
String s = memberOrderService.orderPayNotify("1870522601479000064", 1); String s = memberOrderService.orderPayNotify("1870522601479000064", 1);
return AjaxResult.success(); return AjaxResult.success();
......
...@@ -231,6 +231,8 @@ wx: ...@@ -231,6 +231,8 @@ wx:
apiV3Key: yFRJqhZQJ45wrwg2zJwokb40P7Yn2123 apiV3Key: yFRJqhZQJ45wrwg2zJwokb40P7Yn2123
# 微信支付回调通知域名 # 微信支付回调通知域名
notifyUrl: https://server.chsie.com.cn/api/pay/createNativePayParamNotify notifyUrl: https://server.chsie.com.cn/api/pay/createNativePayParamNotify
# 微信支付回调通知域名
h5NotifyUrl: https://server.chsie.com.cn/api/pay/createH5PayParamNotify
# 支付宝支付回调通知域名 # 支付宝支付回调通知域名
notifyZfbUrl: https://server.chsie.com.cn/api/pay/aliPayBoilerNotify notifyZfbUrl: https://server.chsie.com.cn/api/pay/aliPayBoilerNotify
# 商品描述 # 商品描述
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<version>23.4</version> <version>23.4</version>
<classifier>jdk17</classifier> <classifier>jdk17</classifier>
<scope>system</scope> <scope>system</scope>
<systemPath>C:/Users/71960/.m2/repository/com/aspose/aspose-words/23.4/aspose-words-23.4-jdk17.jar</systemPath> <systemPath>F:/Maven/maven-repo/com/aspose/aspose-words/23.4/aspose-words-23.4-jdk17.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Configuration;
/** /**
* 微信支付V3相关参数配置 * 微信支付V3相关参数配置
*
* @author Wzp * @author Wzp
*/ */
@Getter @Getter
...@@ -25,9 +26,15 @@ public class WeiXinPayConfig { ...@@ -25,9 +26,15 @@ public class WeiXinPayConfig {
@Value("${wx.pay.apiV3Key}") @Value("${wx.pay.apiV3Key}")
private String apiV3Key; private String apiV3Key;
//微信回调地址 //微信回调地址
@Value("${wx.pay.notifyUrl}") @Value("${wx.pay.notifyUrl}")
private String notifyUrl; private String notifyUrl;
//微信H5回调地址
@Value("${wx.pay.h5NotifyUrl}")
private String h5NotifyUrl;
//支付宝回调地址 //支付宝回调地址
@Value("${wx.pay.notifyZfbUrl}") @Value("${wx.pay.notifyZfbUrl}")
private String notifyZfbUrl; private String notifyZfbUrl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment