|
@@ -10,6 +10,8 @@ import com.microsvc.toolkit.middleware.payment.impl.AliPaymentServicePlugin;
|
|
|
import com.microsvc.toolkit.middleware.payment.impl.WxPaymentServicePlugin;
|
|
|
import com.microsvc.toolkit.middleware.payment.impl.YeepayPaymentServicePlugin;
|
|
|
import com.microsvc.toolkit.middleware.payment.properties.PayConfigProperties;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.SysConfigService;
|
|
|
+import com.yonge.cooleshow.common.constant.SysConfigConstant;
|
|
|
import com.yonge.cooleshow.common.enums.EPayerType;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -36,6 +38,9 @@ public class PaymentMerchantConfigServiceImpl extends ServiceImpl<PaymentMerchan
|
|
|
@Autowired
|
|
|
private PayConfigProperties properties;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysConfigService sysConfigService;
|
|
|
+
|
|
|
@PostConstruct
|
|
|
public void init(){
|
|
|
List<PaymentMerchantConfig> list = this.list();
|
|
@@ -43,6 +48,7 @@ public class PaymentMerchantConfigServiceImpl extends ServiceImpl<PaymentMerchan
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
return;
|
|
|
}
|
|
|
+ String notify = sysConfigService.findConfigValue(SysConfigConstant.ADAPAY_CLOSE_ORDER_NOTIFY);
|
|
|
|
|
|
List<String> pluginNames = Lists.newArrayList();
|
|
|
for (PaymentMerchantConfig config : list) {
|
|
@@ -58,6 +64,7 @@ public class PaymentMerchantConfigServiceImpl extends ServiceImpl<PaymentMerchan
|
|
|
adapayPayConfig.setMerchantId(config.getApiKey());
|
|
|
adapayPayConfig.setPayNotifyUrl(properties.getPayNotifyUrl());
|
|
|
adapayPayConfig.setRefundNotifyUrl(properties.getRefundNotifyUrl());
|
|
|
+ adapayPayConfig.setClosedNotifyUrl(notify);
|
|
|
adapayPayConfig.setKeyPublic(config.getRsaPublicKey());
|
|
|
adapayPayConfig.setKeyPrivate(config.getRsaPrivateKey());
|
|
|
adapayPayConfig.setWxAppId(config.getWxAppId());
|