培训班报名微信换成灵枢

This commit is contained in:
wuchunlei
2025-10-17 17:47:10 +08:00
parent c6b6dda9fb
commit c416fb9b3d
6 changed files with 16 additions and 0 deletions

View File

@@ -56,6 +56,8 @@ public class WechatPayConfig implements Serializable {
*/
@Value("${wxpay.mchId}")
private String mchId;
@Value("${wxpay.lsMchId}")
private String lsMchId;
/**
* pay url
*/

View File

@@ -80,6 +80,9 @@ public class WeChatPayController {
map.put("noncestr", nonceStr);
map.put("package", "Sign=WXPay");
paramMap.put("mchid", wechatPayConfig.getMchId());
if ("trainingClass".equals(paymentInfo.getOrderType())){
paramMap.put("mchid", wechatPayConfig.getLsMchId());
}
QueryWrapper<PayWechatOrderEntity> wechatOrderQueryWrapper = new QueryWrapper<>();
wechatOrderQueryWrapper.eq("order_sn", paymentInfo.getOrderSn());
PayWechatOrderEntity payWechatOrder = payWechatOrderService.getOne(wechatOrderQueryWrapper);

View File

@@ -12,6 +12,10 @@ public class WechatPaymentInfo implements Serializable {
* 订单号
*/
private String orderSn;
/**
* 订单类型
*/
private String orderType;
/**
* 订单 ID
*/

View File

@@ -109,6 +109,9 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
paramMap.put("appid", appid);
// 商户 id
paramMap.put("mchid", wechatPayConfig.getMchId());
if ("trainingClass".equals(paymentInfo.getOrderType())){
paramMap.put("mchid", wechatPayConfig.getLsMchId());
}
// 描述
paramMap.put("description", "微信支付");
// 订单编号

View File

@@ -95,6 +95,8 @@ wxpay:
xlkjappId: wxd6bfeec65bc7abee
thyyappId: wx5c50e3696028d2ec
mchId: 1612860909
#灵枢商户号
lsMchId: 1612860909
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
notifyUrl: http://c6f94c98.natappfree.cc/pb/pay/payNotify
refundUrl: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds

View File

@@ -93,6 +93,8 @@ wxpay:
xlkjappId: wxd6bfeec65bc7abee
thyyappId: wx5c50e3696028d2ec
mchId: 1612860909
#灵枢商户号
lsMchId: 1612860909
payUrl: https://api.mch.weixin.qq.com/v3/pay/transactions/app
notifyUrl: https://api.nuttyreading.com/pay/payNotify
refundUrl: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds