|
|
@@ -61,8 +61,12 @@ public class PaymentConfigServiceImpl implements IPaymentConfigService {
|
|
|
public PaymentConfigVo getWechatPayConfig() {
|
|
|
PaymentConfig config = getOrCreateWechatConfig();
|
|
|
PaymentConfigVo vo = new PaymentConfigVo();
|
|
|
+ vo.setAppId(config.getAppId());
|
|
|
vo.setMchId(config.getMchId());
|
|
|
vo.setApiV3Key(config.getApiV3Key());
|
|
|
+ vo.setSerialNo(config.getSerialNo());
|
|
|
+ vo.setPrivateKeyPath(config.getPrivateKeyPath());
|
|
|
+ vo.setCertPath(config.getCertPath());
|
|
|
vo.setNotifyUrl(config.getPayNotifyUrl());
|
|
|
vo.setPublicKeyId(config.getPublicKeyId());
|
|
|
vo.setPrivateKeyUploaded(config.getPrivateKeyPath() != null && !config.getPrivateKeyPath().isEmpty());
|
|
|
@@ -75,8 +79,12 @@ public class PaymentConfigServiceImpl implements IPaymentConfigService {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void saveWechatPayConfig(PaymentConfigBo bo) {
|
|
|
PaymentConfig config = getOrCreateWechatConfig();
|
|
|
+ config.setAppId(bo.getAppId());
|
|
|
config.setMchId(bo.getMchId());
|
|
|
config.setApiV3Key(bo.getApiV3Key());
|
|
|
+ config.setSerialNo(bo.getSerialNo());
|
|
|
+ config.setPrivateKeyPath(bo.getPrivateKeyPath());
|
|
|
+ config.setCertPath(bo.getCertPath());
|
|
|
config.setPayNotifyUrl(bo.getNotifyUrl());
|
|
|
config.setPublicKeyId(bo.getPublicKeyId());
|
|
|
saveOrUpdate(config);
|