|
|
@ -553,6 +553,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
resolver.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) {
|
|
|
|
resolver.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) {
|
|
|
|
client.put("enable_alipayplus", true);
|
|
|
|
client.put("enable_alipayplus", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
client.put("enable_alipayaps", false);
|
|
|
|
|
|
|
|
MerchantChannelPermissionResolver resolverAps = this.paymentApi.channelApi(PayChannel.ALIPAY_APS.getChannelCode()).getChannelPermissionResolver();
|
|
|
|
|
|
|
|
if (!Objects.isNull(resolver) &&
|
|
|
|
|
|
|
|
resolverAps.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) {
|
|
|
|
|
|
|
|
client.put("enable_alipayaps", true);
|
|
|
|
|
|
|
|
}
|
|
|
|
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
|
|
|
|
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
|
|
|
|
if (apsConfig == null) {
|
|
|
|
if (apsConfig == null) {
|
|
|
|
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor());
|
|
|
|
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor());
|
|
|
@ -1588,9 +1594,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
throw new NotFoundException("Client Not Exists");
|
|
|
|
throw new NotFoundException("Client Not Exists");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
clientModifySupport.processModify(new SwitchChannelPermissionModify(manager, clientMoniker, merchantInfoProvider, paymentApi.channelApi(channel).getChannelPermissionResolver(), allow));
|
|
|
|
clientModifySupport.processModify(new SwitchChannelPermissionModify(manager, clientMoniker, merchantInfoProvider, channelApi.getChannelPermissionResolver(), allow));
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
logger.error("Failed to change channel switch:{}", channel);
|
|
|
|
logger.error("Failed to change channel switch:{}", channel,e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
logger.info("{}({}) switched client {} channel {} to {}", manager.getString("display_name"), manager.getString("manager_id"), clientMoniker, channel, allow);
|
|
|
|
logger.info("{}({}) switched client {} channel {} to {}", manager.getString("display_name"), manager.getString("manager_id"), clientMoniker, channel, allow);
|
|
|
|
if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) {
|
|
|
|
if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) {
|
|
|
|