diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 5ec1b35b2..73059b3ab 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -571,4 +571,6 @@ public interface ClientManager { RPayMerchantEntity applyMWMerchantId(String clientMoniker, JSONObject manager); RPayMerchantEntity queryMWMerchantIdStatus(String clientMoniker, JSONObject manager); + + RPayMerchantEntity queryMWMerchantInfo(String clientMoniker, JSONObject 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 7d53238bb..6e50ed185 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 @@ -2063,7 +2063,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))) { JSONObject extRateParams = new JSONObject(){{ put("domestic_rate_value", config.getBigDecimal("rate_value")); - put("overseas_rate_value", config.getBigDecimal("international_rate_value")); + put("overseas_rate_value", config.getJSONObject("ext_rates").getBigDecimal("international_rate_value")); }}; newConfig.put("ext_rates", extRateParams.toJSONString()); } @@ -6862,6 +6862,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid return rPayPaymentCardSvcApi.findMerchant(client); } + @Override + public RPayMerchantEntity queryMWMerchantInfo(String clientMoniker, JSONObject manager) { + JSONObject client = getClientInfoByMoniker(clientMoniker); + if (client == null) { + throw new InvalidShortIdException(); + } + JSONObject bankAccount = getBankAccountByClientId(client.getIntValue("client_id")); + return (new RPayMerchantEntity()).applyClientInfo(client).applyBankAccount(bankAccount); + } + private boolean isAddCardPaymentRate(JSONObject config, int clientId) { if (!StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type")) && !StringUtils.equalsIgnoreCase("rpaypmt_dd", config.getString("type"))) { diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index ba7beafc9..9286f8051 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -898,4 +898,9 @@ public class PartnerManageController { @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){ return clientManager.queryMWMerchantIdStatus(clientMoniker,manager); } + + @ManagerMapping(value = "/{clientMoniker}/query/mw_info", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) + public RPayMerchantEntity queryMWMerchantInfo(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + return clientManager.queryMWMerchantInfo(clientMoniker, manager); + } } diff --git a/src/main/ui/static/commons/templates/order_detail.html b/src/main/ui/static/commons/templates/order_detail.html index 200b25ade..58b4b1713 100644 --- a/src/main/ui/static/commons/templates/order_detail.html +++ b/src/main/ui/static/commons/templates/order_detail.html @@ -175,9 +175,9 @@
-{{order.card_bank}}
diff --git a/src/main/ui/static/dashboard/templates/partner_dashboard.html b/src/main/ui/static/dashboard/templates/partner_dashboard.html index 7cd046263..805e0603d 100644 --- a/src/main/ui/static/dashboard/templates/partner_dashboard.html +++ b/src/main/ui/static/dashboard/templates/partner_dashboard.html @@ -361,7 +361,7 @@{{order.card_bank}}