diff --git a/pom.xml b/pom.xml index e9835d1a7..f3c044b2b 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.4.14 + 2.4.16 UTF-8 2.4.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index 9c91e5a9f..d8725038f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -312,6 +312,7 @@ public class TestController { */ @ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) public void exportAggregateCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception { + logger.info("=====>exportAggregateCardAgreeFile"); clientManager.getAggregateCardAgreeFileAgain(clientMoniker, manager); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 6d0eb8c3d..25fde2f81 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -4695,6 +4695,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (rate == null) { throw new BadRequestException("The Partner's Rate is not config!"); } + checkChannelRate(client,PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()); + checkChannelRate(client,PayChannel.ALIPAY_APS_CASHIER.getChannelCode()); + List clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id")); if (clientFiles == null || clientFiles.equals("")) { throw new BadRequestException("The Compliance File Must Be Uploaded!"); @@ -4719,6 +4722,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid sendCommissionWechatMessage(client); } } + private void checkChannelRate(JSONObject client,String channel){ + MerchantChannelPermissionResolver resolver = this.paymentApi.channelApi(channel).getChannelPermissionResolver(); + if (!Objects.isNull(resolver) && + resolver.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()) + ) { + JSONObject rateApsInstore = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), channel); + if (rateApsInstore == null) { + throw new BadRequestException("The Partner's "+channel+" Rate is not config!"); + } + } + } @Override @Transactional @@ -7342,14 +7356,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid //装在数据 JSONObject info = new JSONObject(); info.put("down_date", formatter.print(new DateTime()));//下载文件日期 - info.put("bussiness_name", (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " " + client.getString("abn"));//商圈类型 + info.put("bussiness_name", (client.containsKey("company_name") ? client.getString("company_name") : legalInfo.getString("representative_person")) + " " + client.getString("abn"));//商圈类型 info.put("partner_address", client.getString("address"));//商家店铺地址 info.put("partner_country", client.getString("country"));//国家 info.put("partner_state", client.getString("state"));//洲 info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称 info.put("clean_days", clientRate.getInteger("clean_days"));//T+规则清算天数 info.put("partner_industry_mcc", upayProfileInfo.getString("mw_industry"));//信用卡注册商户行业编码 - info.put("legal_bussiness", legalInfo.getString("representative_person") + " AS " + (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码 + info.put("legal_bussiness", client.getString("company_name") + " AS " + (client.containsKey("business_name") ? client.getString("business_name") : legalInfo.getString("representative_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码 info.put("annual_rate", cardAnnualRate);//年费率 info.put("cost_per_transaction", clientRate.getString("transaction_fee"));//每次交易成本 String domesticRateValue = cardRate.getString("domestic_rate_value"); diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java index 7bd44636f..086b071d6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java @@ -832,7 +832,8 @@ public class TradeLogServiceImpl implements TradeLogService { // } @Override public void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { - JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner, new String[]{"Wechat", "Alipay", "AlipayOnline"}); + logger.info("=======>exportTransFlow"); + JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner, new String[]{"Wechat", "Alipay", "AlipayOnline","ApsCashier","ApsInstore"}); JSONObject analysis = transFlow.getJSONObject("analysis"); JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id")); Context ctx = new Context(); @@ -1008,7 +1009,8 @@ public class TradeLogServiceImpl implements TradeLogService { @Override public ModelAndView exportTransFlow(TradeLogQuery query, JSONObject partner, Model model) throws Exception { - JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner, new String[]{"Wechat", "Alipay", "AlipayOnline"}); + logger.info("=======>exportTransFlow::"); + JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner, new String[]{"Wechat", "Alipay", "AlipayOnline","ApsCashier","ApsInstore"}); JSONObject analysis = transFlow.getJSONObject("analysis"); JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id")); ModelAndView view = new ModelAndView("app/invoice.html"); diff --git a/src/main/ui/static/data/alipayMcc.json b/src/main/ui/static/data/alipayMcc.json index 0d98e594f..09bb31e7d 100644 --- a/src/main/ui/static/data/alipayMcc.json +++ b/src/main/ui/static/data/alipayMcc.json @@ -1134,7 +1134,7 @@ { "children": [], "label": "Digital Goods: Games", - "mccCode": "5816", + "mccCode": " 5816", "value": "{\"category\":\"OTHER\",\"code\":\"5816\",\"description\":\"Digital Goods: Games\",\"parentCode\":\"D05\"}" }, {