From 4491e38d71b1fadf6e57763ee0fa075a53463194 Mon Sep 17 00:00:00 2001 From: Todking Date: Fri, 24 Sep 2021 19:46:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=20aps=E8=B0=83=E6=95=B4=E4=B8=BA=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../merchants/core/impls/ClientManagerImpl.java | 14 ++++++++++++++ .../partner/templates/partner_payment_info.html | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) 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 1bf83d7d7..8235414a4 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 @@ -1589,6 +1589,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) { + PayChannel payChannel = PayChannel.fromChannelCode(channel); + if(payChannel == PayChannel.ALIPAY_APS){ + ArrayList apsChannels = new ArrayList<>(); + apsChannels.add(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()); + apsChannels.add(PayChannel.ALIPAY_APS_CASHIER.getChannelCode()); + apsChannels.forEach(apsChannel->{ + extracted(manager, clientMoniker, apsChannel, allow); + }); + }else { + extracted(manager, clientMoniker, channel, allow); + } + } + + private void extracted(JSONObject manager, String clientMoniker, String channel, boolean allow) { for (PaymentChannelApi channelApi : paymentApi.channels()) { if (channelApi.channel().equalsIgnoreCase(channel)) { JSONObject client = getClientInfoByMoniker(clientMoniker); diff --git a/src/main/ui/static/payment/partner/templates/partner_payment_info.html b/src/main/ui/static/payment/partner/templates/partner_payment_info.html index 352c46833..eeed63f14 100644 --- a/src/main/ui/static/payment/partner/templates/partner_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/partner_payment_info.html @@ -261,7 +261,7 @@
+ ng-change="toggleChannel('AlipayAps')">