diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXNativePayClient.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXNativePayClient.java index 87fa69645..e6e5ed779 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXNativePayClient.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/client/impl/wx/WXNativePayClient.java @@ -38,14 +38,14 @@ public class WXNativePayClient extends AbstractPayClient { private WxPayService client; public WXNativePayClient(Long channelId, WXPayClientConfig config) { - super(channelId, PayChannelEnum.WX_PUB.getCode(), config, new WXCodeMapping()); + super(channelId, PayChannelEnum.WX_NATIVE.getCode(), config, new WXCodeMapping()); } @Override protected void doInit() { WxPayConfig payConfig = new WxPayConfig(); BeanUtil.copyProperties(config, payConfig, "keyContent"); - payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); // 设置使用 JS API 支付方式 + payConfig.setTradeType(WxPayConstants.TradeType.NATIVE); // 设置使用 native 支付方式 // if (StrUtil.isNotEmpty(config.getKeyContent())) { // payConfig.setKeyContent(config.getKeyContent().getBytes(StandardCharsets.UTF_8)); // } @@ -97,7 +97,6 @@ public class WXNativePayClient extends AbstractPayClient { .totalFee(reqDTO.getAmount().intValue()) // 单位分 // .timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss")) .spbillCreateIp(reqDTO.getUserIp()) - .tradeType(WxPayConstants.TradeType.NATIVE) .notifyUrl(reqDTO.getNotifyUrl()) .productId(trade_type) .build();