|
|
@ -1,13 +1,10 @@
|
|
|
|
package au.com.royalpay.payment.manage.merchants.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.merchants.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.RpayApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.jd.runtime.beans.SubRpayMerchantInfo;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.PaymentChannelApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentChannelApi;
|
|
|
|
import au.com.royalpay.payment.core.beans.PayChannel;
|
|
|
|
import au.com.royalpay.payment.core.beans.PayChannel;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.EmailException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.EmailException;
|
|
|
@ -234,9 +231,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private WxPayClient wxPayClient;
|
|
|
|
private WxPayClient wxPayClient;
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private RpayApi rpayApi;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ManagerMapper managerMapper;
|
|
|
|
private ManagerMapper managerMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
@ -1559,7 +1553,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
checkAddRate(config, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
|
|
|
|
checkAddRate(config, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
|
|
|
|
checkAddRate(config, "jd", "jd_rate_value", org, "min_jd_rate");
|
|
|
|
checkAddRate(config, "jd", "jd_rate_value", org, "min_jd_rate");
|
|
|
|
checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
|
|
|
|
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
|
|
|
|
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
|
|
|
|
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
|
|
|
@ -1567,7 +1560,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
configNewClientRate(config, clientId, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
|
|
|
|
configNewClientRate(config, clientId, "Bestpay", "bestpay_rate_value", org, "min_bestpay_rate");
|
|
|
|
configNewClientRate(config, clientId, "jd", "jd_rate_value", org, "min_jd_rate");
|
|
|
|
configNewClientRate(config, clientId, "jd", "jd_rate_value", org, "min_jd_rate");
|
|
|
|
configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
|
|
|
|
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3535,32 +3527,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
return sub_merchant_id;
|
|
|
|
return sub_merchant_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String subRpayMerchantApplication(String clientMoniker, JSONObject manager) {
|
|
|
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
|
|
|
if (client == null) {
|
|
|
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SubRpayMerchantInfo subRpayMerchantInfo = JSONObject.toJavaObject(client, SubRpayMerchantInfo.class);
|
|
|
|
|
|
|
|
rpayApi.registerMerchant(client.getIntValue("client_id"), subRpayMerchantInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger.debug("访问成功,返回的信息是: " );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// String sub_merchant_id = elem.elementText("sub_mch_id");
|
|
|
|
|
|
|
|
/* if (StringUtils.isNotEmpty(sub_merchant_id)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new BadRequestException("请求失败");
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
|
|
|
|
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|