parent
4a91dcb3bf
commit
29a384989b
|
@ -38,14 +38,14 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
||||||
private WxPayService client;
|
private WxPayService client;
|
||||||
|
|
||||||
public WXNativePayClient(Long channelId, WXPayClientConfig config) {
|
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
|
@Override
|
||||||
protected void doInit() {
|
protected void doInit() {
|
||||||
WxPayConfig payConfig = new WxPayConfig();
|
WxPayConfig payConfig = new WxPayConfig();
|
||||||
BeanUtil.copyProperties(config, payConfig, "keyContent");
|
BeanUtil.copyProperties(config, payConfig, "keyContent");
|
||||||
payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); // 设置使用 JS API 支付方式
|
payConfig.setTradeType(WxPayConstants.TradeType.NATIVE); // 设置使用 native 支付方式
|
||||||
// if (StrUtil.isNotEmpty(config.getKeyContent())) {
|
// if (StrUtil.isNotEmpty(config.getKeyContent())) {
|
||||||
// payConfig.setKeyContent(config.getKeyContent().getBytes(StandardCharsets.UTF_8));
|
// payConfig.setKeyContent(config.getKeyContent().getBytes(StandardCharsets.UTF_8));
|
||||||
// }
|
// }
|
||||||
|
@ -97,7 +97,6 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
||||||
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
||||||
// .timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"))
|
// .timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"))
|
||||||
.spbillCreateIp(reqDTO.getUserIp())
|
.spbillCreateIp(reqDTO.getUserIp())
|
||||||
.tradeType(WxPayConstants.TradeType.NATIVE)
|
|
||||||
.notifyUrl(reqDTO.getNotifyUrl())
|
.notifyUrl(reqDTO.getNotifyUrl())
|
||||||
.productId(trade_type)
|
.productId(trade_type)
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Reference in New Issue