|
|
@ -3673,7 +3673,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void registerAlipayGms(String clientMoniker, JSONObject manager) {
|
|
|
|
public void registerAlipayGms(String clientMoniker, String representative_id, JSONObject manager) {
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
if (client == null) {
|
|
|
|
if (client == null) {
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
throw new InvalidShortIdException();
|
|
|
@ -3682,6 +3682,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
if (!client.containsKey("store_photo") || !client.containsKey("company_photo")) {
|
|
|
|
if (!client.containsKey("store_photo") || !client.containsKey("company_photo")) {
|
|
|
|
throw new InvalidParameterException("store photo cannot be empty ");
|
|
|
|
throw new InvalidParameterException("store photo cannot be empty ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject client_bank = getBankAccountByClientId(client.getIntValue("client_id"));
|
|
|
|
|
|
|
|
if (client_bank == null || client_bank.size() <= 0) {
|
|
|
|
|
|
|
|
throw new BadRequestException("The Partner's Account is not config!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put("bank_id", client_bank.getString("account_no"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!"Company".equals(client.getString("business_structure"))) {
|
|
|
|
|
|
|
|
if (representative_id == null || representative_id.isEmpty()) {
|
|
|
|
|
|
|
|
throw new BadRequestException("ID or passport number can't be null");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put("representative_id", representative_id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
|
|
|
|
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
|
|
|
|
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
|
|
|
|
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
|
|
|
|
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
|
|
|
|
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
|
|
|
@ -3697,6 +3710,22 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String queryAlipayGmsStatus(String clientMoniker, JSONObject manager) {
|
|
|
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
|
|
|
if (client == null) {
|
|
|
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
checkOrgPermission(manager, client);
|
|
|
|
|
|
|
|
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
|
|
|
|
|
|
|
|
Element resultElement = alipayClient.queryGmsPortalStatus(mch.getPid(), client);
|
|
|
|
|
|
|
|
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
|
|
|
|
|
|
|
|
return resultElement.elementText("error");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Element responseElement = resultElement.element("response").element("alipay");
|
|
|
|
|
|
|
|
return responseElement.elementText("secondary_merchant_id") + " - status : " + responseElement.elementText("status");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void subRpayMerchantApplication(String clientMoniker, JSONObject merchantInfo,JSONObject manager) {
|
|
|
|
public void subRpayMerchantApplication(String clientMoniker, JSONObject merchantInfo,JSONObject manager) {
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|