mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
✨
【支付模块】 添加 微信native支付
This commit is contained in:
parent
4a91dcb3bf
commit
29a384989b
@ -38,14 +38,14 @@ public class WXNativePayClient extends AbstractPayClient<WXPayClientConfig> {
|
||||
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<WXPayClientConfig> {
|
||||
.totalFee(reqDTO.getAmount().intValue()) // 单位分
|
||||
// .timeExpire(DateUtil.format(reqDTO.getExpireTime(), "yyyyMMddHHmmss"))
|
||||
.spbillCreateIp(reqDTO.getUserIp())
|
||||
.tradeType(WxPayConstants.TradeType.NATIVE)
|
||||
.notifyUrl(reqDTO.getNotifyUrl())
|
||||
.productId(trade_type)
|
||||
.build();
|
||||
|
Loading…
Reference in New Issue
Block a user