|
@@ -479,6 +479,7 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
// 银联云闪付
|
|
// 银联云闪付
|
|
|
model.setApiName("saveUnionPayConfig");
|
|
model.setApiName("saveUnionPayConfig");
|
|
|
model.setFields(getUnionPay());
|
|
model.setFields(getUnionPay());
|
|
|
|
|
+ model.setType("json");
|
|
|
}
|
|
}
|
|
|
return ResultContent.buildSuccess(model);
|
|
return ResultContent.buildSuccess(model);
|
|
|
}
|
|
}
|
|
@@ -530,6 +531,10 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
if (ObjectUtils.isNotEmpty(payChannelConfig)) {
|
|
if (ObjectUtils.isNotEmpty(payChannelConfig)) {
|
|
|
model.setPayLogo(payChannelConfig.getLogo());
|
|
model.setPayLogo(payChannelConfig.getLogo());
|
|
|
}
|
|
}
|
|
|
|
|
+ Organization organization = organizationDao.findTopByOid(entity.getBelongOig());
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(organization)) {
|
|
|
|
|
+ model.setBelongOrgName(organization.getName());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return model;
|
|
return model;
|
|
|
}
|
|
}
|
|
@@ -583,7 +588,16 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public ResultContent upsertPayAccount(String projectOid, PaymentType paymentType) {
|
|
public ResultContent upsertPayAccount(String projectOid, PaymentType paymentType) {
|
|
|
- ProjectOrgPaySettingInfo entity = projectPaySettingInfoDao.findTopByProjectOidAndChannelTypeAndIsDefault(projectOid, paymentType, Boolean.TRUE);
|
|
|
|
|
|
|
+ ProjectMainPaySetting projectMainPaySetting = projectMainPaySettingDao.findTopByProjectOidAndChannelType(projectOid, paymentType);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(projectMainPaySetting)) {
|
|
|
|
|
+ log.error("upsertPayAccount 项目未配置");
|
|
|
|
|
+ return ResultContent.buildFail("项目未配置");
|
|
|
|
|
+ }
|
|
|
|
|
+ ProjectOrgPaySettingInfo entity = projectMainPaySetting.getPaySettingInfo();
|
|
|
|
|
+ if (ObjectUtils.isEmpty(entity)) {
|
|
|
|
|
+ log.error("upsertPayAccount 关联机构支付配置为空");
|
|
|
|
|
+ return ResultContent.buildFail("关联机构支付配置为空");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
String payAccountName = orgPayAccountService.buildPayAccountName(projectOid, paymentType);
|
|
String payAccountName = orgPayAccountService.buildPayAccountName(projectOid, paymentType);
|
|
|
|
|
|
|
@@ -606,7 +620,18 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
accountModel.setConf(appConf);
|
|
accountModel.setConf(appConf);
|
|
|
} else if (paymentType == PaymentType.UnionFrictionlessPay) {
|
|
} else if (paymentType == PaymentType.UnionFrictionlessPay) {
|
|
|
// 银联无感支付
|
|
// 银联无感支付
|
|
|
|
|
+ accountModel.setProductChannelType(PayProductChannelType.ChinaumsSenseless);
|
|
|
|
|
|
|
|
|
|
+ WxPayConfigModel model = (WxPayConfigModel) entity.getPayConfig();
|
|
|
|
|
+
|
|
|
|
|
+ WeChatMiniAppConf appConf = new WeChatMiniAppConf();
|
|
|
|
|
+ appConf.setAppId(model.getAppId());
|
|
|
|
|
+ appConf.setMchId(model.getMchId());
|
|
|
|
|
+ appConf.setMchSerialNo(model.getMchSerialNo());
|
|
|
|
|
+ appConf.setPriKeyPath(model.getPrivateKeyStr());
|
|
|
|
|
+ appConf.setApiV3KeyPath(model.getApiV3Key());
|
|
|
|
|
+ appConf.setNotifyUrl(model.getNotifyUrl());
|
|
|
|
|
+ accountModel.setConf(appConf);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 查看平台支付产品状态
|
|
// 查看平台支付产品状态
|
|
@@ -620,6 +645,14 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
} else {
|
|
} else {
|
|
|
disable = Boolean.TRUE;
|
|
disable = Boolean.TRUE;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if (!disable) {
|
|
|
|
|
+ // 项目配置 项目上没启用
|
|
|
|
|
+ ProjectPaySetting projectPaySetting = projectPaySettingDao.findTopByProjectOidAndChannelType(projectOid, paymentType);
|
|
|
|
|
+ if (projectPaySetting.getState() == null || projectPaySetting.getState() == DataState.Disable) {
|
|
|
|
|
+ disable = Boolean.TRUE;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
// 不可用
|
|
// 不可用
|
|
|
disable = Boolean.TRUE;
|
|
disable = Boolean.TRUE;
|