add 新增aps配置,alipayCN渠道切换配置

master
Todking 3 years ago
parent 8890cab76f
commit 7b0f130ffe

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.2.31</version>
<version>2.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>

@ -0,0 +1,20 @@
package au.com.royalpay.payment.manage.mappers.system.aps;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import org.apache.ibatis.annotations.Param;
@AutoMapper(tablename = "sys_client_aps_config", pkName = "id")
public interface ApsConfigMapper {
@AutoSql(SqlType.SELECT)
ApsConfigData findByClientId(@Param("client_id") String clientId);
@AutoSql(SqlType.INSERT)
void saveApsConfigClientId(ApsConfigData apsConfigData);
void updateApsConfigClientId(JSONObject apsConfigData);
}

@ -0,0 +1,13 @@
package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.manage.merchants.core.descriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
public interface ApsConfigService {
ApsConfigData getApsConfigByClientId(String clientId);
ApsConfigData saveApsConfigClientId(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor);
ApsConfigData updateApsConfigClientId(String managerId,String clientId, JSONObject apsConfig);
}

@ -0,0 +1,17 @@
package au.com.royalpay.payment.manage.merchants.core.descriptor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ApsConfigDescriptor {
private Boolean enableAlipayAps = false;
private Boolean alipayCnSwitch = false;
}

@ -0,0 +1,38 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.manage.mappers.system.aps.ApsConfigMapper;
import au.com.royalpay.payment.manage.merchants.core.ApsConfigService;
import au.com.royalpay.payment.manage.merchants.core.descriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class ApsConfigServiceImpl implements ApsConfigService {
@Resource
private ApsConfigMapper apsConfigMapper;
@Override
public ApsConfigData getApsConfigByClientId(String clientId) {
return apsConfigMapper.findByClientId(clientId);
}
@Override
public ApsConfigData saveApsConfigClientId(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor) {
ApsConfigData apsConfigData = ApsConfigData.saveData(managerId, clientId, apsConfigDescriptor);
apsConfigMapper.saveApsConfigClientId(apsConfigData);
return apsConfigMapper.findByClientId(clientId);
}
@Override
public ApsConfigData updateApsConfigClientId(String managerId, String clientId, JSONObject apsConfig) {
apsConfig.put("clientId", clientId);
apsConfig.put("modifier", managerId);
apsConfigMapper.updateApsConfigClientId(apsConfig);
return apsConfigMapper.findByClientId(clientId);
}
}

@ -55,13 +55,12 @@ import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMap
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.core.*;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBank;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBankClientNullException;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBankInfo;
import au.com.royalpay.payment.manage.merchants.core.descriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import au.com.royalpay.payment.manage.merchants.entity.impls.*;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum;
import au.com.royalpay.payment.manage.notice.core.MailService;
@ -329,6 +328,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private PaymentApi paymentApi;
@Resource
private MerchantChannelPermissionManager merchantChannelPermissionManager;
@Resource
private ApsConfigService apsConfigService;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@ -554,7 +555,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
resolver.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) {
client.put("enable_alipayplus", true);
}
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
if (apsConfig == null) {
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor());
}
client.put("aps_config_id", apsConfig.getId());
client.put("enable_alipayaps", apsConfig.getEnableAlipayAps());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
return client;
}
@ -1583,12 +1590,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new NotFoundException("Client Not Exists");
}
if (channelApi.channel().equalsIgnoreCase("alipayaps")) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("enableAlipayAps", allow);
apsConfigService.updateApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), jsonObject);
} else {
merchantChannelPermissionManager.switchMerchantChannelPermission(channelApi.getMetadata().payChannel(), client.getIntValue("client_id"), allow);
try {
clientModifySupport.processModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow));
} catch (Exception e) {
logger.error("Failed to change channel switch:{}", channel);
}
}
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))) {
int clientId = client.getIntValue("client_id");

@ -0,0 +1,46 @@
package au.com.royalpay.payment.manage.merchants.entity;
import au.com.royalpay.payment.manage.merchants.core.descriptor.ApsConfigDescriptor;
import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ApsConfigData implements Serializable {
private String id;
private String creator;
private Date createTime;
private String modifier;
private Date modifyTime;
private String clientId;
private Boolean enableAlipayAps;
private Boolean alipayCnSwitch;
public static ApsConfigData saveData(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor) {
return new ApsConfigData()
.setClientId(clientId)
.setId(UUID.randomUUID().toString().replace("-", ""))
.setAlipayCnSwitch(apsConfigDescriptor.getAlipayCnSwitch())
.setEnableAlipayAps(apsConfigDescriptor.getEnableAlipayAps())
.setCreator(managerId)
.setCreateTime(new Date());
}
}

@ -0,0 +1,55 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.merchants.core.ApsConfigService;
import au.com.royalpay.payment.manage.merchants.core.descriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/sys/partners/aps")
public class ApsConfigController {
@Resource
private ApsConfigService apsConfigService;
/**
* aps
*
* @param clientId
* @return
*/
@GetMapping("/{clientId}")
public ApsConfigData getApsConfigByClientId(@PathVariable("clientId") String clientId) {
return apsConfigService.getApsConfigByClientId(clientId);
}
/**
* aps
*
* @param clientId
* @param apsConfigDescriptor
* @return
*/
@ManagerMapping(value = "/{clientId}", method = RequestMethod.POST, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
public ApsConfigData saveApsConfigClientId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable("clientId") String clientId, @RequestBody ApsConfigDescriptor apsConfigDescriptor) {
return apsConfigService.saveApsConfigClientId(manager.getString("managerId"), clientId, apsConfigDescriptor);
}
/**
* aps
*
* @param clientId
* @param apsConfig
* @return
*/
@ManagerMapping(value = "/{clientId}", method = RequestMethod.PUT, role = { ManagerRole.ADMIN,ManagerRole.OPERATOR,ManagerRole.SITE_MANAGER })
public ApsConfigData updateApsConfigClientId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable("clientId") String clientId, @RequestBody JSONObject apsConfig) {
return apsConfigService.updateApsConfigClientId(manager.getString("managerId"),clientId, apsConfig);
}
}

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.aps.ApsConfigMapper">
<resultMap type="au.com.royalpay.payment.manage.merchants.entity.ApsConfigData" id="ApsConfigResult">
<result property="id" column="id"/>
<result property="creator" column="creator"/>
<result property="createTime" column="create_time"/>
<result property="modifier" column="modifier"/>
<result property="modifyTime" column="modify_time"/>
<result property="enableAlipayAps" column="enable_alipayaps"/>
<result property="alipayCnSwitch" column="alipay_cn_switch"/>
<result property="clientId" column="client_id"/>
</resultMap>
<update id="updateApsConfigClientId">
UPDATE sys_client_aps_config SET modify_time = now(), modifier = #{modifier}
<if test="alipayCnSwitch !=null">, alipay_cn_switch = #{alipayCnSwitch}</if>
<if test="enableAlipayAps !=null">, enable_alipayaps = #{enableAlipayAps}</if>
WHERE client_id = #{clientId}
</update>
</mapper>

@ -917,7 +917,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.updateMerchantLocation = function () {
var params = window.frames['merchant_detail'].merchant_location
if (params) {
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {})
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
})
}
}
},
@ -1614,7 +1615,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$http.delete('/sys/partners/' + $scope.partner.client_moniker).then(
function () {
$state.go('^')
commonDialog.alert({ title: 'Delete', content: 'Partner Already Disabled', type: 'error' })
commonDialog.alert({
title: 'Delete',
content: 'Partner Already Disabled',
type: 'error'
})
},
function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
@ -1632,7 +1637,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/revert').then(
function () {
$state.go('^')
commonDialog.alert({ title: 'Revert', content: 'Partner Already Revert', type: 'success' })
commonDialog.alert({
title: 'Revert',
content: 'Partner Already Revert',
type: 'success'
})
},
function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
@ -1929,7 +1938,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_compliance_permission', {allow: $scope.partner.wechat_compliance}).then(
function () {},
function () {
},
function (resp) {
commonDialog.alert({
title: 'failed to change wechat_compliance permission status',
@ -1952,7 +1962,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
return
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/local_merchant_permission', {allow: $scope.partner.local_merchant}).then(
function () {},
function () {
},
function (resp) {
commonDialog.alert({
title: 'failed to change local_merchant permission status',
@ -2282,7 +2293,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'})
},
function (resp) {
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Error',
content: '进件失败:' + resp.data.message,
type: 'error'
})
}
)
})
@ -2310,10 +2325,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
.then(function () {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(
function () {
commonDialog.alert({ title: 'Success', content: '提示AlipayOnline进件成功', type: 'success' })
commonDialog.alert({
title: 'Success',
content: '提示AlipayOnline进件成功',
type: 'success'
})
},
function (resp) {
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Error',
content: '进件失败:' + resp.data.message,
type: 'error'
})
}
)
})
@ -2430,6 +2453,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
}
$scope.switchAlipayCn = function (clientId, apsConfigId, alipayCn) {
if (!$scope.paymentInfo.enable_alipayaps) {
commonDialog.alert({
title: 'ERROR',
content: "AlipayCN channel can be switched only after Alipay+(APS) is enabled",
type: 'error',
})
$scope.loadPartnerPaymentInfo()
} else {
$http.put('/sys/partners/aps/' + clientId, {id: apsConfigId, alipayCnSwitch: alipayCn}).then(
function () {
$scope.loadPartnerPaymentInfo()
},
function (resp) {
commonDialog.alert({
title: 'Failed to change alipayCN channel permission status',
content: resp.data.message,
type: 'error',
})
}
)
}
}
$scope.toggleChannel = function (channel) {
if (!channel) {
return
@ -2441,6 +2487,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// $scope.init.channel[channel] = true
// return
// }
if($scope.paymentInfo.alipay_cn_switch){
commonDialog.alert({
title: 'ERROR',
content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel",
type: 'error',
})
$scope.loadPartnerPaymentInfo()
return;
}
$scope.getComplianceInfo()
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {
commonDialog
@ -3253,7 +3308,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.init.allow_surcharge_credit = true
return
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', { allow_surcharge_credit: allowSurchargeCredit }).then(function (resp) {})
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/allow_surcharge_credit', {allow_surcharge_credit: allowSurchargeCredit}).then(function (resp) {
})
}
$scope.taxInSurcharge = function (taxInSurcharge) {
if (!$scope.init.tax_in_surcharge) {
@ -3727,7 +3783,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.updateAccountRole = function (account) {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/accounts/' + account.account_id + '/role', {role: account.role}).then(
function () {},
function () {
},
function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}
@ -4276,7 +4333,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.updateMerchantLocation = function () {
var params = window.frames['merchant_detail'].merchant_location
if (params) {
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {})
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
})
}
}
},
@ -4575,7 +4633,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.listDevices()
},
function (resp) {
commonDialog.alert({ title: 'Update remark failed', content: resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Update remark failed',
content: resp.data.message,
type: 'error'
})
}
)
})
@ -4586,7 +4648,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.listDevices()
},
function (resp) {
commonDialog.alert({ title: 'Failed to disable device', content: resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Failed to disable device',
content: resp.data.message,
type: 'error'
})
}
)
}
@ -4596,7 +4662,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.listDevices()
},
function (resp) {
commonDialog.alert({ title: 'Failed to enable device', content: resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Failed to enable device',
content: resp.data.message,
type: 'error'
})
}
)
}
@ -5230,6 +5300,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
type: 'error',
})
}
$scope.complianceCheck = function () {
if (!$rootScope.complianceCheck) {
$rootScope.complianceCheck = {}
@ -5643,6 +5714,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
type: 'error',
})
}
$scope.complianceCheck = function () {
if (!$rootScope.complianceCheck) {
$rootScope.complianceCheck = {}
@ -5875,6 +5947,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
type: 'error',
})
}
$scope.complianceCheck = function () {
if (!$rootScope.complianceCheck) {
$rootScope.complianceCheck = {}
@ -6511,7 +6584,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadPartnerInfo()
},
function (resp) {
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Error',
content: '进件失败:' + resp.data.message,
type: 'error'
})
}
)
})
@ -6530,11 +6607,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
.then(function () {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(
function () {
commonDialog.alert({ title: 'Success', content: '提示AlipayOnline进件成功', type: 'success' })
commonDialog.alert({
title: 'Success',
content: '提示AlipayOnline进件成功',
type: 'success'
})
$scope.loadPartnerInfo()
},
function (resp) {
commonDialog.alert({ title: 'Error', content: '进件失败:' + resp.data.message, type: 'error' })
commonDialog.alert({
title: 'Error',
content: '进件失败:' + resp.data.message,
type: 'error'
})
}
)
})
@ -7279,7 +7364,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.businessLicence = resp.data.path
merchantInfo['business_licence'] = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.businessLicenceProgress
@ -7433,7 +7522,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.directorPassport = resp.data.path
$scope.directors.filePath = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.directorPassportProgress
@ -7462,7 +7555,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.executivePassport = resp.data.path
$scope.executives.filePath = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.executivePassportProgress
@ -7682,7 +7779,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.businessLicence = resp.data.path
merchantInfo['business_licence'] = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.businessLicenceProgress
@ -7836,7 +7937,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.directorPassport = resp.data.path
$scope.directors.filePath = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.directorPassportProgress
@ -7865,7 +7970,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.executivePassport = resp.data.path
$scope.executives.filePath = resp.data.path
merchantId = resp.data.merchantId
commonDialog.alert({ title: 'Upload Success', content: 'Upload Success', type: 'success' })
commonDialog.alert({
title: 'Upload Success',
content: 'Upload Success',
type: 'success'
})
},
function (resp) {
delete $scope.executivePassportProgress
@ -7957,7 +8066,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.clientPermission.isValid = permission.is_valid
var params = angular.copy($scope.clientPermission)
$http.post('/sys/permission/' + permission.id, params).then(
function (resp) {},
function (resp) {
},
function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}
@ -7967,7 +8077,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.init = function () {
var params = {client_moniker: $scope.partner.client_moniker}
$http.post('/sys/permission/init', params).then(
function (resp) {},
function (resp) {
},
function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
}

@ -257,6 +257,13 @@
ng-change="toggleChannel('alipayplus')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Alipay+(APS)</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipayaps" bs-switch
ng-change="toggleChannel('alipayaps')">
</div>
</div>
</div>
</div>
</div>
@ -541,6 +548,23 @@
</div>
</div>
<!--AlipayCN支付渠道切换-->
<div class="panel panel-default" ng-if="(('111'|withRole))">
<div class="panel-heading">AlipayCN channel replace</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">AlipayCN channel</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.alipay_cn_switch" bs-switch switch-on-text="APS"
switch-off-text="Alipay"
ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)">
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)">
<div class="panel-heading">Retail In Store Payment(App, WePayLite, Albert)</div>
<div class="panel-body">

Loading…
Cancel
Save