|
@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.dao.SysConfigDao;
|
|
|
import com.ym.mec.biz.dal.entity.CooperationOrgan;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroup;
|
|
|
import com.ym.mec.biz.dal.entity.SysAccount;
|
|
|
+import com.ym.mec.biz.dal.enums.PaymentChannelTypeEnum;
|
|
|
import com.ym.mec.biz.service.PayService;
|
|
|
import com.ym.mec.biz.service.StudentPaymentOrderService;
|
|
|
import com.ym.mec.biz.service.SysAccountService;
|
|
@@ -61,11 +62,15 @@ public class PayServiceImpl implements PayService {
|
|
|
|
|
|
//支付通道决策
|
|
|
Map unionPay = new HashMap();
|
|
|
- SysAccount routingAccount = getRoutingAccount(company,amount);
|
|
|
+ SysAccount routingAccount = getRoutingAccount(company, amount);
|
|
|
+ PaymentChannelTypeEnum paymentChannelType = PaymentChannelTypeEnum.COM;
|
|
|
+ if(routingAccount.getType().equals("PER")){
|
|
|
+ paymentChannelType = PaymentChannelTypeEnum.PER;
|
|
|
+ }
|
|
|
Map payMap = null;
|
|
|
String type = null;
|
|
|
if (routingAccount.getChannel().equals("YQPAY")) {
|
|
|
- payMap = YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody,routingAccount.getMerNo(), routingAccount.getRoutingMerNo());
|
|
|
+ payMap = YqPayUtil.getPayMap(amount, orderNo, notifyUrl, returnUrl, orderSubject, orderBody, routingAccount.getMerNo(), routingAccount.getRoutingMerNo());
|
|
|
type = "YQPAY";
|
|
|
} else {
|
|
|
payMap = new Pay().getPayMap(amount, orderNo, notifyUrl, orderSubject, orderBody);
|
|
@@ -74,6 +79,7 @@ public class PayServiceImpl implements PayService {
|
|
|
|
|
|
unionPay.put("orderNo", orderNo);
|
|
|
unionPay.put("type", type);
|
|
|
+ unionPay.put("paymentChannelType", paymentChannelType);
|
|
|
unionPay.put("payMap", payMap);
|
|
|
return unionPay;
|
|
|
}
|
|
@@ -85,6 +91,7 @@ public class PayServiceImpl implements PayService {
|
|
|
|
|
|
/**
|
|
|
* 获取收款账户
|
|
|
+ *
|
|
|
* @param company
|
|
|
* @param money
|
|
|
* @return
|
|
@@ -105,6 +112,9 @@ public class PayServiceImpl implements PayService {
|
|
|
channel = sysConfigDao.findConfigValue("com_account_channel");
|
|
|
type = "COM";
|
|
|
}
|
|
|
+ if (company.equals("yadie")) {
|
|
|
+ type = "PER";
|
|
|
+ }
|
|
|
routingAccount = sysAccountService.getAccount(company, channel, type, null);
|
|
|
|
|
|
return routingAccount;
|