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 @@
- System : {{transcommon.sys_not_settled|currency:'AUD '}} + Cross-border Payment : {{transcommon.sys_not_settled|currency:'AUD '}} Card Payment : {{transcommon.rpaypmt_card_not_settled|currency:'AUD '}} diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 8d13cc065..43c2ea609 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -4964,9 +4964,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) }; $scope.applyMWSubMerchantId = function () { - commonDialog.confirm({ + $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/mw_info').then(function (resp) { + commonDialog.confirm({ title: 'Apply Merchant Warrior Sub Merchant Id', - contentHtml: $sce.trustAsHtml('Are you sure to apply merchant Warrior sub merchant id for [' + $scope.partner.company_name + ']?') + contentHtml: $sce.trustAsHtml('Are you sure to apply merchant Warrior sub merchant id for [' + $scope.partner.company_name + ']?'), + json: resp.data }).then(function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/applyMWMerchantId').then(function (res) { commonDialog.alert({ @@ -4979,6 +4981,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); }) }) + }); }; $scope.applyRpaySubMerchantId = function () { $uibModal.open({ diff --git a/src/main/ui/static/payment/partner/templates/partner_new_card_payment_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_card_payment_rate.html index 3dbbdfe8d..18f5807c8 100644 --- a/src/main/ui/static/payment/partner/templates/partner_new_card_payment_rate.html +++ b/src/main/ui/static/payment/partner/templates/partner_new_card_payment_rate.html @@ -48,7 +48,7 @@
-
%
@@ -91,13 +91,13 @@
-
+ min="0" step="0.1" id="transaction_fee_input" required>
$
diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 9ba3cb101..8fee5858c 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -183,7 +183,7 @@
  • Category - +
  • Hide..... diff --git a/src/main/ui/static/payment/tradelog/templates/partner_trade_detail_edit.html b/src/main/ui/static/payment/tradelog/templates/partner_trade_detail_edit.html index cce854e87..16d03d7ba 100644 --- a/src/main/ui/static/payment/tradelog/templates/partner_trade_detail_edit.html +++ b/src/main/ui/static/payment/tradelog/templates/partner_trade_detail_edit.html @@ -148,9 +148,9 @@
  • -
    -
    -

    +
    +
    +

    {{order.card_bank}}