1.微信支付修复部分jdk无法加载证书问题

2.微信下载对账单报无法类型转换问题
3.微信退款非必填参数忽略
This commit is contained in:
egzosn
2021-11-20 23:49:58 +08:00
parent e4ca2a0e7d
commit 6ab618ca44
11 changed files with 76 additions and 60 deletions

View File

@@ -46,7 +46,7 @@ public class WxV3CombinePayController {
private WxCombinePayService service = null;
@PostConstruct //没有证书的情况下注释掉,避免启动报错
// @PostConstruct //没有证书的情况下注释掉,避免启动报错
public void init() {
WxPayConfigStorage wxPayConfigStorage = new WxPayConfigStorage();
wxPayConfigStorage.setAppId("wxc7b993ff15a9f26c");

View File

@@ -27,6 +27,9 @@ import com.egzosn.pay.web.support.HttpRequestNoticeParams;
import com.egzosn.pay.wx.v3.api.WxPayConfigStorage;
import com.egzosn.pay.wx.v3.api.WxPayService;
import com.egzosn.pay.wx.v3.bean.WxTransactionType;
import com.egzosn.pay.wx.v3.bean.order.H5Info;
import com.egzosn.pay.wx.v3.bean.order.SceneInfo;
import com.egzosn.pay.wx.v3.utils.WxConst;
/**
* 微信V3发起支付入口
@@ -75,12 +78,11 @@ public class WxV3PayController {
@RequestMapping(value = "toPay.html", produces = "text/html;charset=UTF-8")
public String toPay(HttpServletRequest request, BigDecimal price) {
PayOrder order = new PayOrder("订单title", "摘要", null == price ? BigDecimal.valueOf(0.01) : price, UUID.randomUUID().toString().replace("-", ""), WxTransactionType.H5);
order.setSpbillCreateIp(request.getHeader("X-Real-IP"));
StringBuffer requestURL = request.getRequestURL();
//设置网页地址
order.setWapUrl(requestURL.substring(0, requestURL.indexOf("/") > 0 ? requestURL.indexOf("/") : requestURL.length()));
//设置网页名称
order.setWapName("在线充值");
SceneInfo sceneInfo = new SceneInfo();
sceneInfo.setPayerClientIp(request.getHeader("X-Real-IP"));
sceneInfo.setH5Info(new H5Info("在线充值", requestURL.substring(0, requestURL.indexOf("/") > 0 ? requestURL.indexOf("/") : requestURL.length())));
order.addAttr(WxConst.SCENE_INFO, sceneInfo);
// Map orderInfo = service.orderInfo(order);
// return service.buildRequest(orderInfo, MethodType.POST);

View File

@@ -44,7 +44,7 @@ public class WxV3ProfitSharingController {
private WxProfitSharingService service = null;
@PostConstruct //没有证书的情况下注释掉,避免启动报错
// @PostConstruct //没有证书的情况下注释掉,避免启动报错
public void init() {
WxPayConfigStorage wxPayConfigStorage = new WxPayConfigStorage();
wxPayConfigStorage.setAppId("wxc7b993ff15a9f26c");