|
|
@@ -146,7 +146,9 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
return ResultContent.buildFail(content.getMsg());
|
|
|
}
|
|
|
ProjectOrgPaySettingInfo settingInfo = content.getContent();
|
|
|
-
|
|
|
+ if (StringUtils.isEmpty(param.getNotifyUrl())) {
|
|
|
+ param.setNotifyUrl(param.getNotifyUrl().trim());
|
|
|
+ }
|
|
|
//TODO 检查微信支付参数等
|
|
|
WxPayConfigModel configModel = null;
|
|
|
if (settingInfo.getPayConfig() != null) {
|
|
|
@@ -157,6 +159,7 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
}
|
|
|
BeanUtils.copyProperties(param, configModel);
|
|
|
|
|
|
+ // 证书文件
|
|
|
MultipartFile privateKeyFile = param.getPrivateKeyFile();
|
|
|
String privateKeyStr = AesUtils.turnMultipartFileToString(privateKeyFile);
|
|
|
if (StringUtils.isNotEmpty(privateKeyStr)) {
|
|
|
@@ -436,11 +439,14 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
ProjectOrgPaySettingInfo entity = projectPaySettingInfoDao.findTopByProjectOidAndChannelTypeAndIsDefault(projectOid, paymentType, Boolean.TRUE);
|
|
|
|
|
|
String payAccountName = orgPayAccountService.buildPayAccountName(projectOid, paymentType);
|
|
|
+
|
|
|
AccountModel accountModel = new AccountModel();
|
|
|
- Boolean disable = Boolean.FALSE;
|
|
|
accountModel.setName(payAccountName);
|
|
|
+
|
|
|
+ Boolean disable = Boolean.FALSE;
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
if (paymentType == PaymentType.WeChat) {
|
|
|
+ // 微信支付
|
|
|
accountModel.setProductChannelType(PayProductChannelType.WeChatMiniAppPay);
|
|
|
WeChatMiniAppConf appConf = new WeChatMiniAppConf();
|
|
|
WxPayConfigModel model = (WxPayConfigModel) entity.getPayConfig();
|
|
|
@@ -451,8 +457,12 @@ public class ProjectPaySettingServiceImpl extends SuperService {
|
|
|
appConf.setApiV3KeyPath(model.getApiV3Key());
|
|
|
appConf.setNotifyUrl(model.getNotifyUrl());
|
|
|
accountModel.setConf(appConf);
|
|
|
+ } else if (paymentType == PaymentType.UnionFrictionlessPay) {
|
|
|
+ // 银联无感支付
|
|
|
+
|
|
|
}
|
|
|
- // 支付产品
|
|
|
+
|
|
|
+ // 查看平台支付产品状态
|
|
|
PayChannelConfig channelConfig = payChannelConfigDao.findTopByPaymentType(paymentType);
|
|
|
if (ObjectUtils.isNotEmpty(channelConfig)) {
|
|
|
if (channelConfig.getState() == null || channelConfig.getState() != DataState.Enable) {
|