master
yangkai 6 years ago
parent fcd07f15a9
commit cbf474e01a

@ -0,0 +1,11 @@
package au.com.royalpay.payment.manage.management.sysconfig.core;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
public interface SysPaymentConfig {
List<JSONObject> getPaymentChannel();
void updatePaymentChannel(JSONObject manager, String channel, int type);
}

@ -0,0 +1,34 @@
package au.com.royalpay.payment.manage.management.sysconfig.core.impls;
import au.com.royalpay.payment.manage.management.sysconfig.core.SysPaymentConfig;
import au.com.royalpay.payment.manage.mappers.system.RateMapper;
import au.com.royalpay.payment.manage.mappers.system.SysPaymentConfigMapper;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
public class SysPaymentConfigImpl implements SysPaymentConfig {
@Resource
private SysPaymentConfigMapper sysPaymentConfigMapper;
@Override
public List<JSONObject> getPaymentChannel() {
return sysPaymentConfigMapper.selectAll();
}
@Override
public void updatePaymentChannel(JSONObject manager, String channel, int type) {
JSONObject paymentConfig = sysPaymentConfigMapper.find(channel, type);
if (paymentConfig == null) {
throw new BadRequestException("不存在该快捷通道");
}
Date lastUpdateTime = new Date();
sysPaymentConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), false);
sysPaymentConfigMapper.updatePaymentConfig(channel, type, lastUpdateTime, manager.getString("display_name"), true);
}
}

@ -1,17 +1,15 @@
package au.com.royalpay.payment.manage.management.sysconfig.web;
import au.com.royalpay.payment.manage.management.sysconfig.core.ClearDateManager;
import au.com.royalpay.payment.manage.management.sysconfig.core.SysPaymentConfig;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -27,6 +25,8 @@ public class SysConfigController {
private SysConfigManager sysConfigManager;
@Resource
private ClearDateManager clearDateManager;
@Resource
private SysPaymentConfig sysPaymentConfig;
@ManagerMapping(value = "/base", method = RequestMethod.GET)
public JSONObject getBaseConfig() {
@ -48,8 +48,13 @@ public class SysConfigController {
clearDateManager.setMonthClearDays(monthPattern, days);
}
@ManagerMapping(value = "/payment/config", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF, ManagerRole.OPERATOR})
public List<JSONObject> selectPaymentChannel() {
return sysPaymentConfig.getPaymentChannel();
}
public static void main(String[] args) {
System.out.println("asd".equals(null));
@ManagerMapping(value = "/payment/{channel}/config/{type}", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.FINANCIAL_STAFF, ManagerRole.OPERATOR})
public void updatePaymentChannel(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String channel, @PathVariable int type) {
sysPaymentConfig.updatePaymentChannel(manager, channel, type);
}
}

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.mappers.system;
import cn.yixblog.support.mybatis.autosql.annotations.AdvanceSelect;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@AutoMapper(tablename = "sys_payment_config",pkName = "channel")
public interface SysPaymentConfigMapper {
@AutoSql(type = SqlType.SELECT)
List<JSONObject> selectAll();
@AutoSql(type = SqlType.SELECT)
JSONObject find(@Param(value = "channel_id") String channel, @Param(value = "type") int type);
void updatePaymentConfig(@Param(value = "channel_id") String channel, @Param(value = "type") int type, @Param(value = "last_update_date")Date lastUpdateDate,
@Param(value = "last_update_by")String lastUpdateBy, @Param(value = "is_valid") boolean is_valid);
JSONObject findOne(@Param(value = "type") int type);
}

@ -369,4 +369,11 @@ public interface ClientManager {
JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query);
List<JSONObject> getClientBySimpleQuery(JSONObject param);
void switchPaymentConfig(String clientMoniker, HttpServletResponse response) throws IOException;
@Transactional
void switchCBBankLink(JSONObject manager, String clientMoniker, boolean allow);
String cbBankPayLink(String clientMoniker);
}

@ -27,25 +27,7 @@ import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientApplyMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAuditProcessMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBDMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientDeviceMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper;
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
import au.com.royalpay.payment.manage.mappers.system.MailUnsubMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.mappers.system.PermissionPartnerModuleMapper;
import au.com.royalpay.payment.manage.mappers.system.SysRpayMerchantApplyMapper;
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.ActivityPosterBuilder;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
@ -313,6 +295,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private PermissionPartnerManagerImpl permissionPartnerManagerImpl;
@Resource
private RiskAttentionMerchantsMapper riskAttentionMerchantsMapper;
@Resource
private SysPaymentConfigMapper sysPaymentConfigMapper;
@Resource
private SmsSender smsSender;
@ -445,6 +429,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String yeepayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/yeepay/partners/" + client.getString("client_moniker") + "/jump/app");
client.put("yeepayQrcodeUrl", QRCodeUtils.qrcodeImageCode(yeepayQrcodeUrl, 250, true));
}
if (client.getString("cb_bankpay_url") != null) {
String cbBankPayQrcodeUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
client.put("cbBankPayQrcodeUrl", QRCodeUtils.qrcodeImageCode(cbBankPayQrcodeUrl, 250, true));
}
return client;
}
@ -1627,6 +1615,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkAddRate(config, "hf", "hf_rate_value", org, "min_hf_rate");
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
checkAddRate(config, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate");
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
@ -1636,6 +1625,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate");
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
configNewClientRate(config, clientId, "Yeepay", "yeepay_rate_value", org, "min_yeepay_rate");
configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate");
//todo 暂不更新Rpay+ 费率信息
rpayApi.modifySurchargeConfig(client);
@ -4268,6 +4258,50 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return PageListUtils.buildPageListResult(partners);
}
@Override
public void switchPaymentConfig(String clientMoniker, HttpServletResponse response) throws IOException {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1);
if (paymentConfig == null) {
throw new BadRequestException("服务商未开启快捷支付");
}
response.sendRedirect(String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker));
}
@Override
public void switchCBBankLink(JSONObject manager, String clientMoniker, boolean allow) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
if (StringUtils.isEmpty(client.getString("cb_bankpay_url"))) {
String longUrl = PlatformEnvironment.getEnv().concatUrl("/sys/partners/" + client.getString("client_moniker") + "/cb_bankpay/link");
String cb_bankpay_url = getCBBankShortLink(longUrl);
client.put("cb_bankpay_url", cb_bankpay_url);
client.put("enable_cb_bankpay_link", allow);
clientMapper.update(client);
} else {
client.put("enable_cb_bankpay_link", allow);
clientMapper.update(client);
}
}
@Override
public String cbBankPayLink(String clientMoniker) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new BadRequestException("partner code is not exists!");
}
JSONObject paymentConfig = sysPaymentConfigMapper.findOne(1);
if (paymentConfig == null) {
throw new BadRequestException("服务商未开启快捷支付");
}
return String.format(PlatformEnvironment.getEnv().concatUrl(paymentConfig.getString("path")), clientMoniker);
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
@ -4292,4 +4326,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}).start();
}
private String getCBBankShortLink(String longUrl) {
MpWechatApi api = mpWechatApiProvider.getNewPaymentApi();
return api.registerShortUrl(longUrl);
}
}

@ -621,4 +621,19 @@ public class PartnerManageController {
return clientManager.comListPartnerSelection(manager, query);
}
@RequestMapping(value = "/{clientMoniker}/cb_bankpay/link", method = RequestMethod.GET)
public void switchPaymentWay(@PathVariable String clientMoniker, HttpServletResponse response) throws IOException {
clientManager.switchPaymentConfig(clientMoniker, response);
}
@ManagerMapping(value = "/{clientMoniker}/cb_bankpay", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchCBBankPayLinkPermission(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchCBBankLink(manager, clientMoniker, pass.getBooleanValue("allow"));
}
@RequestMapping(value = "/{clientMoniker}/jump/link", method = RequestMethod.GET)
public String jumpCBBankPayLink(@PathVariable String clientMoniker) {
return clientManager.cbBankPayLink(clientMoniker);
}
}

@ -30,6 +30,7 @@ public class OrgInfo {
private Double jd_rate_value;
private Double hf_rate_value;
private Double yeepay_rate_value;
private Double cb_bankpay_rate_value;
private int is_valid;
private String search_text;
private int page = 1;
@ -44,6 +45,7 @@ public class OrgInfo {
private Double min_alipayonline_rate;
private Double min_hf_rate;
private Double min_yeepay_rate;
private Double min_cb_bankpay_rate;
private String state;
private String senior_parent_org_id;
@ -341,4 +343,20 @@ public class OrgInfo {
public void setMin_yeepay_rate(Double min_yeepay_rate) {
this.min_yeepay_rate = min_yeepay_rate;
}
public Double getCb_bankpay_rate_value() {
return cb_bankpay_rate_value;
}
public void setCb_bankpay_rate_value(Double cb_bankpay_rate_value) {
this.cb_bankpay_rate_value = cb_bankpay_rate_value;
}
public Double getMin_cb_bankpay_rate() {
return min_cb_bankpay_rate;
}
public void setMin_cb_bankpay_rate(Double min_cb_bankpay_rate) {
this.min_cb_bankpay_rate = min_cb_bankpay_rate;
}
}

@ -0,0 +1,20 @@
<?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.SysPaymentConfigMapper">
<update id="updatePaymentConfig">
update sys_payment_config
SET is_valid = #{is_valid},last_update_by = #{last_update_by},last_update_date = #{last_update_date}
<where>
type = #{type}
<if test="is_valid">
and channel_id = #{channel_id}
</if>
<if test="!is_valid">
and channel_id != #{channel_id}
</if>
</where>
</update>
<select id="findOne" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_payment_config where is_valid = 1 and type = #{type} limit 1;
</select>
</mapper>

@ -203,6 +203,18 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="cb_bankpay_rate_value_input">CB BankPay Rate *</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="number" ng-model="org.cb_bankpay_rate_value"
id="cb_bankpay_rate_value_input" name="cb_bankpay_rate_value"
max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div>
</div>
</div>
<div>
@ -291,6 +303,18 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_cb_bankpay_rate_input">Min CB BankPay Rate *</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="number" ng-model="org.min_cb_bankpay_rate"
id="min_cb_bankpay_rate_input" name="min_cb_bankpay_rate_rate" max="100"
min="0" required>
<span class="input-group-addon">%</span>
</div>
</div>
</div>
</div>
</div>
<div class="form-group"

@ -166,6 +166,13 @@
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="cb_bankpay_rate_value_input">CB BankPay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.cb_bankpay_rate_value" id="cb_bankpay_rate_value_input" name="cb_bankpay_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
@ -236,6 +243,15 @@
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_yeepay_rate_input">Min CB BankPay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_cb_bankpay_rate"
id="min_cb_bankpay_rate_input" name="min_cb_bankpay_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>

@ -13,6 +13,10 @@ define(['angular', 'uiRouter'], function (angular) {
url: '/basic',
templateUrl: '/static/config/sysconfigs/templates/basic.html',
controller: 'basicConfigCtrl'
}).state('sysconfig.payment_bankpay_config', {
url: '/payment',
templateUrl: '/static/config/sysconfigs/templates/payment_bankpay_config.html',
controller: 'paymentChannelConfigCtrl'
}).state('permission', {
url: '/permission',
templateUrl: '/static/config/sysconfigs/templates/permission_config.html',
@ -66,6 +70,51 @@ define(['angular', 'uiRouter'], function (angular) {
}]);
app.controller('paymentChannelConfigCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
$scope.loadPaymentChannel = function () {
$scope.cb_bankpay_channel = null;
$scope.pay_channel = null;
$scope.cb_bankpay = [];
$scope.pay = [];
$http.get('/sysconfig/payment/config').then(function (resp) {
resp.data.forEach(function (channel) {
if (channel.type === 1) {
if (channel.is_valid) {
$scope.cb_bankpay_channel = channel.channel_id;
}
$scope.cb_bankpay.push(channel);
}
if (channel.type === 2) {
if (channel.is_valid) {
$scope.pay_channel = channel.channel_id;
}
$scope.pay.push(channel);
}
})
})
};
$scope.loadPaymentChannel();
$scope.updatePaymentConfig = function (type,channel) {
if (channel == null) {
commonDialog.alert({type: 'error', title: 'Error', content: '支付通道不能为空'});
return;
}
commonDialog.confirm({
title: 'Confirm',
content: '你确定要将支付通道更改为:' + channel
}).then(function () {
$http.put('/sysconfig/payment/'+ channel + '/config/' + type).then(function (resp) {
commonDialog.alert({type: 'success', title: 'Success', content: '修改成功'});
$scope.loadPaymentChannel();
}, function (resp) {
commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message});
$scope.loadPaymentChannel();
});
})
}
}]);
app.controller('servantsConfigCtrl', ['$scope','$http','commonDialog', function ($scope,$http,commonDialog) {
$scope.ctrl={};
$scope.loadServants = function () {

@ -0,0 +1,40 @@
<section class="content-header">
<h1>Basic Config</h1>
<ol class="breadcrumb">
<li>
<a ui-sref="^"><i class="fa fa-cog"></i> System Config</a>
</li>
<li>Payment BankPay Config</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<form role="form" style="margin:0px auto;width: 50%">
<div class="form-group" >
<label>快捷通道</label>
<select class="form-control" name="industry" ng-change="updatePaymentConfig(1,cb_bankpay_channel)"
ng-model="cb_bankpay_channel"
id="cbbankpay-input" required
ng-options="channel.channel_id as channel.channel_name for channel in cb_bankpay">
<option value="">请选择</option>
</select>
<label>网银通道</label>
<select class="form-control" name="industry" ng-change="updatePaymentConfig(2,pay_channel)"
ng-model="pay_channel"
id="-input" required
ng-options="channel.channel_id as channel.channel_name for channel in pay">
<option value="">请选择</option>
</select>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>

@ -35,10 +35,10 @@
<!--Servants Config-->
<!--</a>-->
<!--<a class="btn btn-app" role="button" ui-sref=".payment_config">
<a class="btn btn-app" role="button" ui-sref=".payment_bankpay_config">
<i class="fa fa-edit"></i>
Payment Config
</a>-->
</a>
</div>
</div>
</section>

@ -1318,6 +1318,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
}
};
$scope.copyCBBankPayLink = function() {
var e=document.getElementById("cpcbbankpay");
e.select();
var successful = document.execCommand("Copy");
if (successful) {
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
}else {
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
}
};
$scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data;
@ -1624,6 +1634,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.toggleCBBankPayLink = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay', {allow: $scope.paymentInfo.enable_cb_bankpay_link}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change cb_bankpay permission status',
content: resp.data.message,
type: 'error'
});
})
};
$scope.toggleGatewayEmailNotice = function (channel) {
if (!$scope.paymentInfo) {
return;

@ -173,6 +173,7 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}"><a role="button" ng-click="bankCtrl.rate_name='hf'">HFpay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button" ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Yeepay'}"><a role="button" ng-click="bankCtrl.rate_name='Yeepay'">Yeepay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li>
</ul>
<div class="table-responsive">
<table class="table table-bordered">

@ -183,6 +183,30 @@
</div>
</div>
<!--快捷支付费率-->
<div class="form-group"
ng-class="{'has-error':rate_form.cb_bankpay_rate_value.$invalid && rate_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-4" for="yeepay_rate_value_input">CB BankPay Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="cb_bankpay_rate_value" stringToNumber2 class="form-control" ng-model="rate.cb_bankpay_rate_value"
min="0.6" max="5.0" step="0.1" id="cb_bankpay_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.yeepay_rate_value.$error" ng-if="rate_form.cb_bankpay_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- 新增transaction_fee -->
<div class="form-group"

@ -223,6 +223,12 @@
<input type="checkbox" ng-model="paymentInfo.enable_yeepay" bs-switch switch-change="toggleChannel('yeepay')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">CB BankPay|快捷支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch switch-change="toggleChannel('cb_bankpay')">
</div>
</div>
</div>
</div>
@ -394,6 +400,30 @@
</div>
</div>
</div>
<div class="panel panel-default" ng-if="paymentInfo.enable_cb_bankpay">
<div class="panel-heading">CB Bank Payment</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="col-sm-2 control-label">CB Bank Pay Link</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay_link" bs-switch ng-change="toggleCBBankPayLink()">
&nbsp;&nbsp;<a href={{paymentInfo.cb_bankpay_url}} target="_Blank"><span 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" style="cursor: pointer" ng-click="copyCBBankPayLink()"></i>
<input ng-if="paymentInfo.enable_cb_bankpay_link" style="opacity: 0" id="cpcbbankpay" value={{paymentInfo.cb_bankpay_url}} readonly>
</div>
</div>
<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>
<img ng-src="{{paymentInfo.cbBankPayQrcodeUrl}}" class="img-responsive" />
<div>
&nbsp;&nbsp;<span style="padding-left: 19.2%;font-size:9px;">仅支持微信客户端扫描</span>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Retail In Store Payment(App, WePayLite, Albert)</div>
<div class="panel-body">

@ -62,7 +62,21 @@ $(function () {
updatePrice();
}
});
$('.cb_bankpay').click(function () {
$.ajax({
url: '/sys/partners/' + window.client_moniker + '/jump/link',
method: 'GET',
success: function (res) {
location.href = res;
},
error: function (resp) {
var config = {
template: resp
};
showWeuiDialog(config);
}
})
});
$('#key_B').bind('touchstart', function () {
backspace();
});

Loading…
Cancel
Save