fix WXLitePayClient.java 中copy应忽略的字段

小程序支付,copy应忽略 "privateKeyContent","privateCertContent",而不是“KeyContent”

Signed-off-by: chenlei65368 <chenlei65368@sohu.com>
This commit is contained in:
chenlei65368 2022-10-24 10:43:04 +00:00 committed by Gitee
parent 3cee922e69
commit bb8204b5a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -49,7 +49,7 @@ public class WXLitePayClient extends AbstractPayClient<WXPayClientConfig> {
@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, "privateKeyContent","privateCertContent");
payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); // 设置使用 JS API 支付方式 payConfig.setTradeType(WxPayConstants.TradeType.JSAPI); // 设置使用 JS API 支付方式
// 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));