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

master
Todking 3 years ago
parent 8890cab76f
commit 7b0f130ffe

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>au.com.royalpay.payment</groupId> <groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId> <artifactId>payment-parent</artifactId>
<version>2.2.31</version> <version>2.3.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <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.risk.RiskAttentionMerchantsMapper;
import au.com.royalpay.payment.manage.mappers.system.*; import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.*; 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.*;
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.bank.AustraliaBank; 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.AustraliaBankClientNullException;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBankInfo; 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.entity.impls.*;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum; import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum;
import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.notice.core.MailService;
@ -329,6 +328,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private PaymentApi paymentApi; private PaymentApi paymentApi;
@Resource @Resource
private MerchantChannelPermissionManager merchantChannelPermissionManager; private MerchantChannelPermissionManager merchantChannelPermissionManager;
@Resource
private ApsConfigService apsConfigService;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy"); DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@ -356,7 +357,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private String agreetemplatePdfPath; private String agreetemplatePdfPath;
@Value("${app.agreetemplate.aggregate.path}") @Value("${app.agreetemplate.aggregate.path}")
private String aggregateAgreetemplatePdfPath; private String aggregateAgreetemplatePdfPath;
// private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf"; // private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf"; private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf";
@ -554,7 +555,13 @@ 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);
} }
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; return client;
} }
@ -1583,11 +1590,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new NotFoundException("Client Not Exists"); throw new NotFoundException("Client Not Exists");
} }
merchantChannelPermissionManager.switchMerchantChannelPermission(channelApi.getMetadata().payChannel(), client.getIntValue("client_id"), allow); if (channelApi.channel().equalsIgnoreCase("alipayaps")) {
try { JSONObject jsonObject = new JSONObject();
clientModifySupport.processModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow)); jsonObject.put("enableAlipayAps", allow);
} catch (Exception e) { apsConfigService.updateApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), jsonObject);
logger.error("Failed to change channel switch:{}", channel); } 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); 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))) {
@ -2050,12 +2063,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} else { } else {
List<JSONObject> existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel); List<JSONObject> existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel);
existRate.stream().filter(existConfig -> { existRate.stream().filter(existConfig -> {
if (existConfig.getDate("active_time").equals(config.getDate("active_time")) && existConfig.getDate("expiry_time").equals(config.getDate("expiry_time"))) { if (existConfig.getDate("active_time").equals(config.getDate("active_time")) && existConfig.getDate("expiry_time").equals(config.getDate("expiry_time"))) {
return false; return false;
} }
return true; return true;
} }
) )
.forEach((rateLog) -> { .forEach((rateLog) -> {
rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1)); rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1));
clientRateMapper.updateConfig(rateLog); clientRateMapper.updateConfig(rateLog);
@ -2980,24 +2993,24 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The Partner's Rate is not config!"); throw new BadRequestException("The Partner's Rate is not config!");
} }
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)); client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+"+weChatRate.getString("clean_days")); client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days")); client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia"); client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){ if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday // clean_1 clean_1_friday clean_1_saturday
// second, third or fourth // second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first"); client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second"); client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second"); client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third"); client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third"); client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth"); client.put("clean_1_saturday", "fourth");
} }
try { try {
JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay"); JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay");
@ -3116,19 +3129,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("wechat_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)); client.put("wechat_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + p.getString("clean_days")); client.put("clean", "T+" + p.getString("clean_days"));
client.put("clean_days", p.getString("clean_days")); client.put("clean_days", p.getString("clean_days"));
if("1".equalsIgnoreCase(p.getString("clean_days"))){ if ("1".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days")); client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "first"); client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second"); client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(p.getString("clean_days"))){ } else if ("2".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days")); client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "second"); client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third"); client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(p.getString("clean_days"))){ } else if ("3".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days")); client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "third"); client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth"); client.put("clean_1_saturday", "fourth");
} }
} else if ("Alipay".equals(rate_name)) { } else if ("Alipay".equals(rate_name)) {
client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)); client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
@ -3205,21 +3218,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("clean", "T+" + weChatRate.getString("clean_days")); client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days")); client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia"); client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){ if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday // clean_1 clean_1_friday clean_1_saturday
// second, third or fourth // second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first"); client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second"); client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second"); client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third"); client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third"); client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth"); client.put("clean_1_saturday", "fourth");
} }
try { try {
@ -4106,21 +4119,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("clean", "T+" + weChatRate.getString("clean_days")); client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days")); client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia"); client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){ if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday // clean_1 clean_1_friday clean_1_saturday
// second, third or fourth // second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first"); client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second"); client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second"); client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third"); client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){ } else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days")); client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third"); client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth"); client.put("clean_1_saturday", "fourth");
} }
String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates"); String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates");
JSONObject sysConfigRate = JSON.parseObject(rateConfig); JSONObject sysConfigRate = JSON.parseObject(rateConfig);
@ -4201,7 +4214,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc"))); new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
logs.forEach(log -> log.put("padding", log.getBooleanValue("editable"))); logs.forEach(log -> log.put("padding", log.getBooleanValue("editable")));
JSONObject result = PageListUtils.buildPageListResult(logs); JSONObject result = PageListUtils.buildPageListResult(logs);
result.put("padding", logs.stream().anyMatch(log->log.getBooleanValue("editable"))); result.put("padding", logs.stream().anyMatch(log -> log.getBooleanValue("editable")));
logger.info("##editable{}", result.getBooleanValue("padding")); logger.info("##editable{}", result.getBooleanValue("padding"));
return result; return result;
} }

@ -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>

File diff suppressed because it is too large Load Diff

@ -108,28 +108,28 @@
<label class="col-sm-3 control-label">Max Order Amount</label> <label class="col-sm-3 control-label">Max Order Amount</label>
<div class="col-sm-9"> <div class="col-sm-9">
<p ng-if="!ctrl.editMaxOrderAmount" class="form-control-static"> <p ng-if="!ctrl.editMaxOrderAmount" class="form-control-static">
{{(paymentInfo.max_order_amount|currency:'AUD ')||'Not Configure'}} {{(paymentInfo.max_order_amount | currency:'AUD ') || 'Not Configure'}}
<a role="button" ng-click="ctrl.editMaxOrderAmount=true"><i class="fa fa-edit"></i></a> <a role="button" ng-click="ctrl.editMaxOrderAmount=true"><i class="fa fa-edit"></i></a>
</p> </p>
<div class="input-group" ng-if="ctrl.editMaxOrderAmount"> <div class="input-group" ng-if="ctrl.editMaxOrderAmount">
<div class="input-group-addon">AUD</div> <div class="input-group-addon">AUD</div>
<input type="number" class="form-control" ng-model="paymentInfo.max_order_amount" <input type="number" class="form-control" ng-model="paymentInfo.max_order_amount"
title="Max Order Amount"> title="Max Order Amount">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" title="Save" <button class="btn btn-success" title="Save"
ng-click="saveMaxOrderAmount(paymentInfo.max_order_amount)"> ng-click="saveMaxOrderAmount(paymentInfo.max_order_amount)">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
</button> </button>
</div> </div>
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-danger" title="Clear Limit" <button class="btn btn-danger" title="Clear Limit"
ng-click="saveMaxOrderAmount(null)"> ng-click="saveMaxOrderAmount(null)">
<i class="fa fa-ban"></i> <i class="fa fa-ban"></i>
</button> </button>
</div> </div>
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-danger" title="Cancel" <button class="btn btn-danger" title="Cancel"
ng-click="ctrl.editMaxOrderAmount=false"> ng-click="ctrl.editMaxOrderAmount=false">
<i class="fa fa-remove"></i> <i class="fa fa-remove"></i>
</button> </button>
</div> </div>
@ -140,19 +140,19 @@
<label class="col-sm-3 control-label">Customer Surcharge Rate</label> <label class="col-sm-3 control-label">Customer Surcharge Rate</label>
<div class="col-sm-9"> <div class="col-sm-9">
<p ng-if="!ctrl.editCustomerSurchargeRate" class="form-control-static"> <p ng-if="!ctrl.editCustomerSurchargeRate" class="form-control-static">
{{paymentInfo.customer_surcharge_rate||'Not Configure'}} {{paymentInfo.customer_surcharge_rate || 'Not Configure'}}
<a role="button" ng-click="ctrl.editCustomerSurchargeRate=true"><i <a role="button" ng-click="ctrl.editCustomerSurchargeRate=true"><i
class="fa fa-edit"></i></a> class="fa fa-edit"></i></a>
</p> </p>
<div class="input-group" ng-if="ctrl.editCustomerSurchargeRate"> <div class="input-group" ng-if="ctrl.editCustomerSurchargeRate">
<input type="number" class="form-control" ng-model="paymentInfo.customer_surcharge_rate" <input type="number" class="form-control" ng-model="paymentInfo.customer_surcharge_rate"
title="Customer Surcharge Rate" max="{{paymentInfo.max_customer_surcharge_rate}}" title="Customer Surcharge Rate" max="{{paymentInfo.max_customer_surcharge_rate}}"
min="{{paymentInfo.min_customer_surcharge_rate}}" name="customer_surcharge_rate"> min="{{paymentInfo.min_customer_surcharge_rate}}" name="customer_surcharge_rate">
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" title="Save" <button class="btn btn-success" title="Save"
ng-click="saveCustomerSurchargeRate(paymentInfo.customer_surcharge_rate)"> ng-click="saveCustomerSurchargeRate(paymentInfo.customer_surcharge_rate)">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
</button> </button>
</div> </div>
@ -163,7 +163,7 @@
</div> </div>
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-danger" title="Cancel" <button class="btn btn-danger" title="Cancel"
ng-click="ctrl.editCustomerSurchargeRate=false"> ng-click="ctrl.editCustomerSurchargeRate=false">
<i class="fa fa-remove"></i> <i class="fa fa-remove"></i>
</button> </button>
</div> </div>
@ -178,16 +178,16 @@
<label class="col-sm-3 control-label">Order Expiry Config</label> <label class="col-sm-3 control-label">Order Expiry Config</label>
<div class="col-sm-9"> <div class="col-sm-9">
<p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static"> <p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static">
{{paymentInfo.order_expiry_config||'Not Configure'}} {{paymentInfo.order_expiry_config || 'Not Configure'}}
<a role="button" ng-click="ctrl.editOrderExpiryConfig=true" ng-if="'01'|withRole"><i <a role="button" ng-click="ctrl.editOrderExpiryConfig=true" ng-if="'01'|withRole"><i
class="fa fa-edit"></i></a> class="fa fa-edit"></i></a>
</p> </p>
<div class="input-group" ng-if="ctrl.editOrderExpiryConfig"> <div class="input-group" ng-if="ctrl.editOrderExpiryConfig">
<input type="text" class="form-control" ng-model="paymentInfo.order_expiry_config" <input type="text" class="form-control" ng-model="paymentInfo.order_expiry_config"
title="Prevent not enough refund"> title="Prevent not enough refund">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" <button class="btn btn-success"
ng-click="saveOrderExpiryConfig(paymentInfo.order_expiry_config)"> ng-click="saveOrderExpiryConfig(paymentInfo.order_expiry_config)">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
</button> </button>
</div> </div>
@ -218,21 +218,21 @@
<label class="col-xs-6 control-label">Alipay|支付宝</label> <label class="col-xs-6 control-label">Alipay|支付宝</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch
ng-change="toggleChannel('alipay')"> ng-change="toggleChannel('alipay')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">WeChat|微信</label> <label class="col-xs-6 control-label">WeChat|微信</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch
ng-change="toggleChannel('wechat')"> ng-change="toggleChannel('wechat')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">CB BankPay|快捷支付</label> <label class="col-xs-6 control-label">CB BankPay|快捷支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch
ng-change="toggleChannel('cb_bankpay')"> ng-change="toggleChannel('cb_bankpay')">
</div> </div>
</div> </div>
@ -240,21 +240,28 @@
<label class="col-xs-6 control-label">Card Payment|银行卡支付</label> <label class="col-xs-6 control-label">Card Payment|银行卡支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_card" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_card" bs-switch
ng-change="toggleChannel('rpaypmt_card')"> ng-change="toggleChannel('rpaypmt_card')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Direct Debit|银行账户支付</label> <label class="col-xs-6 control-label">Direct Debit|银行账户支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_dd" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_dd" bs-switch
ng-change="toggleChannel('rpaypmt_dd')"> ng-change="toggleChannel('rpaypmt_dd')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Alipay+|支付宝</label> <label class="col-xs-6 control-label">Alipay+|支付宝</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipayplus" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_alipayplus" bs-switch
ng-change="toggleChannel('alipayplus')"> 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> </div>
@ -274,7 +281,7 @@
<label class="col-sm-2 control-label">Customer Pay for Surcharge On QRCode</label> <label class="col-sm-2 control-label">Customer Pay for Surcharge On QRCode</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.qrcode_surcharge" bs-switch <input type="checkbox" ng-model="paymentInfo.qrcode_surcharge" bs-switch
switch-change="updateClientQRCodePaySurCharge()"> switch-change="updateClientQRCodePaySurCharge()">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -290,13 +297,13 @@
<input type="checkbox" ng-model="qrConfig.preauth" ng-change="reloadQRCode()"> <input type="checkbox" ng-model="qrConfig.preauth" ng-change="reloadQRCode()">
Pre Authorization Pre Authorization
<i class="fa fa-question-circle text-gray" <i class="fa fa-question-circle text-gray"
uib-tooltip="Pre Authorize means this bill will not be settled until completion"></i> uib-tooltip="Pre Authorize means this bill will not be settled until completion"></i>
</label> </label>
<label> <label>
<input type="checkbox" ng-model="qrConfig.customerrate" ng-change="reloadQRCode()"> <input type="checkbox" ng-model="qrConfig.customerrate" ng-change="reloadQRCode()">
Customer Pay for Surcharge Customer Pay for Surcharge
<i class="fa fa-question-circle text-gray" <i class="fa fa-question-circle text-gray"
uib-tooltip="Customer pay for rate means after customer input the price, system will add rate value into the final price. Client will receive full value customer input after settlement. 客户支付费率勾选后将自动在输入金额基础上加上手续费金额,商户将在清算时收到用户输入的金额"></i> uib-tooltip="Customer pay for rate means after customer input the price, system will add rate value into the final price. Client will receive full value customer input after settlement. 客户支付费率勾选后将自动在输入金额基础上加上手续费金额,商户将在清算时收到用户输入的金额"></i>
</label> </label>
</p> </p>
@ -327,7 +334,7 @@
</p> </p>
<p> <p>
<a ng-href="/sys/partners/{{partner.client_moniker}}/qrcode_board/aggregate?currency={{qrConfig.currency}}&preauth={{qrConfig.preauth==true}}&qrcode={{qrConfig.qrcode==true}}&customerrate={{qrConfig.customerrate==true}}" <a ng-href="/sys/partners/{{partner.client_moniker}}/qrcode_board/aggregate?currency={{qrConfig.currency}}&preauth={{qrConfig.preauth==true}}&qrcode={{qrConfig.qrcode==true}}&customerrate={{qrConfig.customerrate==true}}"
download><i class="fa fa-download"></i> Download Aggregate QR Board Image download><i class="fa fa-download"></i> Download Aggregate QR Board Image
(聚合支付水晶立牌:支持支付宝、微信、翼支付)</a> (聚合支付水晶立牌:支持支付宝、微信、翼支付)</a>
</p> </p>
</div> </div>
@ -344,28 +351,28 @@
<label class="col-sm-2 control-label">Enable Socket</label> <label class="col-sm-2 control-label">Enable Socket</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_gateway" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_gateway" bs-switch
switch-change="toggleGateway()"> switch-change="toggleGateway()">
</div> </div>
</div> </div>
<div class="form-group" ng-if="'gateway_upgrade'|withFunc"> <div class="form-group" ng-if="'gateway_upgrade'|withFunc">
<label class="col-sm-2 control-label">Upgrade QRCode</label> <label class="col-sm-2 control-label">Upgrade QRCode</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.gateway_upgrade" bs-switch <input type="checkbox" ng-model="paymentInfo.gateway_upgrade" bs-switch
switch-change="toggleGatewayUpgrade()"> switch-change="toggleGatewayUpgrade()">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">Use Alipay Online</label> <label class="col-sm-2 control-label">Use Alipay Online</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.gateway_alipay_online" bs-switch <input type="checkbox" ng-model="paymentInfo.gateway_alipay_online" bs-switch
switch-change="toggleGatewayAlipayOnline()"> switch-change="toggleGatewayAlipayOnline()">
</div> </div>
</div> </div>
<div class="form-group" ng-if="'api_surcharge'|withFunc"> <div class="form-group" ng-if="'api_surcharge'|withFunc">
<label class="col-sm-2 control-label">Customer Pay for Surcharge On Gateway</label> <label class="col-sm-2 control-label">Customer Pay for Surcharge On Gateway</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.api_surcharge" bs-switch <input type="checkbox" ng-model="paymentInfo.api_surcharge" bs-switch
switch-change="updateClientApiSurCharge()"> switch-change="updateClientApiSurCharge()">
<p class="text-info"> <p class="text-info">
<i class="fa fa-info"></i> If client have already attached surcharge in their own system, ignore <i class="fa fa-info"></i> If client have already attached surcharge in their own system, ignore
this choice.<br> this choice.<br>
@ -380,8 +387,8 @@
<label class="col-sm-2 control-label">Alipay Channel</label> <label class="col-sm-2 control-label">Alipay Channel</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.alipay_payment_channels" bs-switch <input type="checkbox" ng-model="paymentInfo.alipay_payment_channels" bs-switch
data-on-text="Alipay+" data-off-text="Alipay" data-off-color="primary" data-on-text="Alipay+" data-off-text="Alipay" data-off-color="primary"
ng-change="setAlipayChannel()"> ng-change="setAlipayChannel()">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -453,29 +460,29 @@
<label class="col-sm-2 control-label">CB Bank Pay Link</label> <label class="col-sm-2 control-label">CB Bank Pay Link</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay_link" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay_link" bs-switch
ng-change="toggleCBBankPayLink()"> ng-change="toggleCBBankPayLink()">
&nbsp;&nbsp;<a href={{paymentInfo.cb_bankpay_url}} target="_Blank"><span &nbsp;&nbsp;<a href={{paymentInfo.cb_bankpay_url}} target="_Blank"><span
ng-if="paymentInfo.enable_cb_bankpay_link">{{paymentInfo.cb_bankpay_url}}</span></a> ng-if="paymentInfo.enable_cb_bankpay_link">{{paymentInfo.cb_bankpay_url}}</span></a>
<i ng-if="paymentInfo.enable_cb_bankpay_link" class="fa fa-clipboard margin-r-5" <i ng-if="paymentInfo.enable_cb_bankpay_link" class="fa fa-clipboard margin-r-5"
style="cursor: pointer" ng-click="copyCBBankPayLink()"></i> style="cursor: pointer" ng-click="copyCBBankPayLink()"></i>
<input ng-if="paymentInfo.enable_cb_bankpay_link" style="opacity: 0" id="cpcbbankpay" <input ng-if="paymentInfo.enable_cb_bankpay_link" style="opacity: 0" id="cpcbbankpay"
value={{paymentInfo.cb_bankpay_url}} readonly> value={{paymentInfo.cb_bankpay_url}} readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">Customer Pay for Surcharge for CBBank Pay</label> <label class="col-sm-2 control-label">Customer Pay for Surcharge for CBBank Pay</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.cbbank_surcharge" bs-switch <input type="checkbox" ng-model="paymentInfo.cbbank_surcharge" bs-switch
ng-change="updateClientCBBankPaySurCharge()"> ng-change="updateClientCBBankPaySurCharge()">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">CB Bank Pay Channel</label> <label class="col-sm-2 control-label">CB Bank Pay Channel</label>
<div class="col-sm-3"> <div class="col-sm-3">
<select class="form-control" name="industry" <select class="form-control" name="industry"
ng-change="updateCBBankPayConfig('cb_channel_id',partner.cb_channel_id)" ng-change="updateCBBankPayConfig('cb_channel_id',partner.cb_channel_id)"
ng-model="partner.cb_channel_id" id="cbbankpay-input" required ng-model="partner.cb_channel_id" id="cbbankpay-input" required
ng-options="channel.channel_id as channel.channel_name for channel in cb_bankpay"> ng-options="channel.channel_id as channel.channel_name for channel in cb_bankpay">
<option value="">跟随系统</option> <option value="">跟随系统</option>
</select> </select>
</div> </div>
@ -483,7 +490,7 @@
<div class="form-group" ng-if="paymentInfo.enable_cb_bankpay && paymentInfo.enable_cb_bankpay_link"> <div class="form-group" ng-if="paymentInfo.enable_cb_bankpay && paymentInfo.enable_cb_bankpay_link">
<label class="col-sm-2 control-label">CB Bank Pay QR Code</label> <label class="col-sm-2 control-label">CB Bank Pay QR Code</label>
<div class="col-sm-10"> <div class="col-sm-10">
<img ng-src="{{paymentInfo.cbBankPayQrcodeUrl}}" class="img-responsive" /> <img ng-src="{{paymentInfo.cbBankPayQrcodeUrl}}" class="img-responsive"/>
<div> <div>
&nbsp;&nbsp;<span style="padding-left: 4.2%;font-size:9px;">仅支持微信客户端扫描</span> &nbsp;&nbsp;<span style="padding-left: 4.2%;font-size:9px;">仅支持微信客户端扫描</span>
</div> </div>
@ -498,7 +505,7 @@
<label class="col-sm-4 control-label">Select Version</label> <label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()" <select class="form-control" ng-change="changeCBBankPaymentPage()"
ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page"> ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option> <option value="v1">v1</option>
<option value="v2">v2</option> <option value="v2">v2</option>
</select> </select>
@ -507,9 +514,9 @@
<label class="col-sm-4 control-label"></label> <label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;"> <div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'" <img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'"
src="/static/images/cbbank_payment_page_v1.jpg"> src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'" <img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'"
src="/static/images/cbbank_payment_page_v2.jpg"> src="/static/images/cbbank_payment_page_v2.jpg">
</div> </div>
</div> </div>
</div> </div>
@ -527,14 +534,31 @@
<label class="col-sm-2 control-label">Enable International Card</label> <label class="col-sm-2 control-label">Enable International Card</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_international_card" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_international_card" bs-switch
switch-change="switchInternationalCard()"> switch-change="switchInternationalCard()">
</div> </div>
</div> </div>
<div class="form-group" ng-if="'111'|withRole"> <div class="form-group" ng-if="'111'|withRole">
<label class="col-sm-2 control-label">Enable 3DS</label> <label class="col-sm-2 control-label">Enable 3DS</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_threeds" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_threeds" bs-switch
switch-change="switchThreeDS()"> switch-change="switchThreeDS()">
</div>
</div>
</div>
</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>
@ -550,14 +574,14 @@
<label class="col-sm-2 control-label">Enable Socket</label> <label class="col-sm-2 control-label">Enable Socket</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_retail" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_retail" bs-switch
switch-change="toggleOffline()"> switch-change="toggleOffline()">
</div> </div>
</div> </div>
<div class="form-group" ng-if="'retail_surcharge'|withFunc"> <div class="form-group" ng-if="'retail_surcharge'|withFunc">
<label class="col-sm-2 control-label">Customer Pay for Surcharge for Retail</label> <label class="col-sm-2 control-label">Customer Pay for Surcharge for Retail</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.retail_surcharge" bs-switch <input type="checkbox" ng-model="paymentInfo.retail_surcharge" bs-switch
switch-change="updateClientRetailPaySurCharge()"> switch-change="updateClientRetailPaySurCharge()">
</div> </div>
</div> </div>
</div> </div>
@ -565,14 +589,14 @@
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Refund </div> <div class="panel-heading">Refund</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" ng-if="'1000000000111'|withRole"> <div class="form-group" ng-if="'1000000000111'|withRole">
<label class="col-sm-2 control-label">Enable Refund</label> <label class="col-sm-2 control-label">Enable Refund</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_refund" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_refund" bs-switch
switch-change="toggleRefund()"> switch-change="toggleRefund()">
</div> </div>
</div> </div>
@ -580,7 +604,7 @@
<label class="col-sm-2 control-label">Enable Pre-authorize Refund</label> <label class="col-sm-2 control-label">Enable Pre-authorize Refund</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_pre_refund" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_pre_refund" bs-switch
switch-change="togglePreRefund()"> switch-change="togglePreRefund()">
</div> </div>
</div> </div>
@ -589,13 +613,13 @@
<label class="col-sm-2 control-label">Refund Credit Line</label> <label class="col-sm-2 control-label">Refund Credit Line</label>
<div class="col-sm-9"> <div class="col-sm-9">
<p ng-if="!ctrl.editRefundCreditLine" class="form-control-static"> <p ng-if="!ctrl.editRefundCreditLine" class="form-control-static">
{{paymentInfo.refund_credit_line||'Not Configure'}} {{paymentInfo.refund_credit_line || 'Not Configure'}}
<a role="button" ng-click="ctrl.editRefundCreditLine=true" ng-if="'01'|withRole"><i <a role="button" ng-click="ctrl.editRefundCreditLine=true" ng-if="'01'|withRole"><i
class="fa fa-edit"></i></a> class="fa fa-edit"></i></a>
</p> </p>
<div class="input-group" ng-if="ctrl.editRefundCreditLine"> <div class="input-group" ng-if="ctrl.editRefundCreditLine">
<input type="number" maxlength="6" class="form-control" <input type="number" maxlength="6" class="form-control"
ng-model="paymentInfo.refund_credit_line"> ng-model="paymentInfo.refund_credit_line">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" ng-click="setRefundCreditLine()"> <button class="btn btn-success" ng-click="setRefundCreditLine()">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
@ -619,7 +643,7 @@
</p> </p>
<div class="input-group" ng-if="ctrl.editRefundPwd"> <div class="input-group" ng-if="ctrl.editRefundPwd">
<input type="text" class="form-control" maxlength="6" minlength="1" <input type="text" class="form-control" maxlength="6" minlength="1"
ng-model="paymentInfo.new_refund_password"> ng-model="paymentInfo.new_refund_password">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" ng-click="resetRefundPwd(paymentInfo.new_refund_password)"> <button class="btn btn-success" ng-click="resetRefundPwd(paymentInfo.new_refund_password)">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
@ -646,14 +670,14 @@
<label class="col-sm-2 control-label">Require Customer Information</label> <label class="col-sm-2 control-label">Require Customer Information</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.require_custinfo" bs-switch <input type="checkbox" ng-model="paymentInfo.require_custinfo" bs-switch
switch-change="toggleRequireCustInfo()"> switch-change="toggleRequireCustInfo()">
</div> </div>
</div> </div>
<div class="form-group" ng-if="'1000000000111'|withRole"> <div class="form-group" ng-if="'1000000000111'|withRole">
<label class="col-sm-2 control-label">Require Remark</label> <label class="col-sm-2 control-label">Require Remark</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.require_remark" bs-switch <input type="checkbox" ng-model="paymentInfo.require_remark" bs-switch
switch-change="toggleRequireRemark()"> switch-change="toggleRequireRemark()">
</div> </div>
</div> </div>
</div> </div>
@ -668,7 +692,7 @@
<div class="col-sm-10"> <div class="col-sm-10">
<div ng-if="param.type=='boolean'"> <div ng-if="param.type=='boolean'">
<input type="checkbox" ng-model="param.value" bs-switch <input type="checkbox" ng-model="param.value" bs-switch
ng-change="extChangeParam(param.name,param.value)"> ng-change="extChangeParam(param.name,param.value)">
</div> </div>
<div ng-if="param.type == 'string'"> <div ng-if="param.type == 'string'">
@ -679,7 +703,7 @@
</p> </p>
<div class="input-group" ng-if="param.flag"> <div class="input-group" ng-if="param.flag">
<input type="text" class="form-control" ng-model="param.value" <input type="text" class="form-control" ng-model="param.value"
title="Prevent not enough refund"> title="Prevent not enough refund">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-success" ng-click="extChangeParam(param.name,param.value)"> <button class="btn btn-success" ng-click="extChangeParam(param.name,param.value)">
<i class="fa fa-check"></i> <i class="fa fa-check"></i>
@ -707,31 +731,31 @@
<label class="col-sm-4 control-label">Select Version</label> <label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6"> <div class="col-sm-6">
<select class="form-control" ng-change="changePaymentPage()" ng-model="paymentInfo.paypad_version" <select class="form-control" ng-change="changePaymentPage()" ng-model="paymentInfo.paypad_version"
title="Payment Page"> title="Payment Page">
<option value="v1">v1</option> <option value="v1">v1</option>
<option value="v2">v2</option> <option value="v2">v2</option>
<option value="v3">v3</option> <option value="v3">v3</option>
<option value="v4">v4</option> <option value="v4">v4</option>
<option value="v5">v5</option> <option value="v5">v5</option>
<option value="v6">v6</option> <option value="v6">v6</option>
<!-- <option value="v2101">multiple payment methods</option>--> <!-- <option value="v2101">multiple payment methods</option>-->
</select> </select>
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
<label class="col-sm-4 control-label"></label> <label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;"> <div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v1'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v1'"
src="/static/images/payment_page_v1.jpg"> src="/static/images/payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2'"
src="/static/images/payment_page_v2.jpg"> src="/static/images/payment_page_v2.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v3'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v3'"
src="/static/images/payment_page_v3.jpg"> src="/static/images/payment_page_v3.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v4'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v4'"
src="/static/images/payment_page_v4.jpg"> src="/static/images/payment_page_v4.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v5'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v5'"
src="/static/images/payment_page_v5.jpg"> src="/static/images/payment_page_v5.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v6'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v6'"
src="/static/images/payment_page_v6.jpg"> src="/static/images/payment_page_v6.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'"
src="/static/images/payment_page_v2101_step1.png"> src="/static/images/payment_page_v2101_step1.png">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'" <img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'"

Loading…
Cancel
Save