After Width: | Height: | Size: 41 KiB |
@ -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.deacriptor.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,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.deacriptor.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);
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package au.com.royalpay.payment.manage.merchants.deacriptor;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class ApsConfigDescriptor {
|
||||
|
||||
private Boolean alipayCnSwitch = false;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package au.com.royalpay.payment.manage.merchants.entity;
|
||||
|
||||
|
||||
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
|
||||
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())
|
||||
.setCreator(managerId)
|
||||
.setCreateTime(new Date());
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package au.com.royalpay.payment.manage.merchants.entity.impls;
|
||||
|
||||
import au.com.royalpay.payment.manage.merchants.entity.ClientModifyOperation;
|
||||
import au.com.royalpay.payment.tools.merchants.core.MerchantChannelPermissionResolver;
|
||||
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
|
||||
import au.com.royalpay.payment.tools.utils.JsonUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class SwitchChannelPermissionModify extends ClientModifyOperation {
|
||||
private final MerchantInfoProvider mchInfoProvider;
|
||||
private final MerchantChannelPermissionResolver channelResolver;
|
||||
private final boolean enableFlag;
|
||||
|
||||
public SwitchChannelPermissionModify(JSONObject account, String clientMoniker, MerchantInfoProvider mchInfoProvider, MerchantChannelPermissionResolver channelResolver, boolean enableFlag) {
|
||||
super(account, clientMoniker);
|
||||
this.mchInfoProvider = mchInfoProvider;
|
||||
this.channelResolver = channelResolver;
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String business() {
|
||||
return (enableFlag ? "开启 " : "关闭 ") + "渠道[" + channelResolver.payChannel().getChannelCode() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JSONObject getModifyResult() {
|
||||
return JsonUtils.newJson(json -> json.put("enable_" + channelResolver.payChannel().getChannelCode(), enableFlag + ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Consumer<JSONObject> getModifyProcess() {
|
||||
return client -> channelResolver.switchPermission(mchInfoProvider, client.getIntValue("client_id"), enableFlag);
|
||||
}
|
||||
}
|
@ -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.deacriptor.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);
|
||||
}
|
||||
}
|
@ -1,23 +1,23 @@
|
||||
app:
|
||||
wechatpay:
|
||||
api-host: https://apihk.mch.weixin.qq.com
|
||||
api-host: https://api.mch.weixin.qq.com
|
||||
merchants:
|
||||
'1307485301':
|
||||
app-id: wx703febcbd34dae38
|
||||
example-sub-merchant-id: 11755174
|
||||
key-file: classpath:apiclient_cert.p12
|
||||
key-file: /Users/qingjiaoxuan/extra/apiclient_cert.p12
|
||||
mch-key: 7e2d8c4aab15e4cabec1207ba79086b1
|
||||
merchant-id: 1307485301
|
||||
'1431999902':
|
||||
app-id: wx703febcbd34dae38
|
||||
example-sub-merchant-id: 42991963
|
||||
key-file: classpath:apiclient_new_cert.p12
|
||||
key-file: /Users/qingjiaoxuan/extra/apiclient_new_cert.p12
|
||||
mch-key: p3tgzrAJbe6eQrunbv8jb8gz5yXxvJdE
|
||||
merchant-id: 1431999902
|
||||
'1487387142':
|
||||
app-id: wx3e14d1144d898197
|
||||
example-sub-merchant-id: 117551742
|
||||
key-file: classpath:napclient_cert.p12
|
||||
key-file: /Users/qingjiaoxuan/extra/napclient_cert.p12
|
||||
mch-key: OuvLIL93STqFhTngNaBGT8751ZJn4FKL
|
||||
merchant-id: 1487387142
|
||||
mp-id: globalpay
|
||||
|
@ -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>
|
@ -0,0 +1 @@
|
||||
2037ffb83b877c2b0dba98a20f4391d6
|
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 499 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 5.6 KiB |
@ -0,0 +1,285 @@
|
||||
<div class="content">
|
||||
<form novalidate name="subForm">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" > {{title}}</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-horizontal">
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.merchantDisplayName.$invalid && subForm.merchant_storename.$dirty}">
|
||||
<label class="control-label col-sm-4" for="merchantDisplayName_input">Merchant DisplayName</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.merchantDisplayName"
|
||||
type="text" name="merchantDisplayName" id="merchantDisplayName_input" required maxlength="64">
|
||||
<div ng-messages="subForm.merchantDisplayName.$error" ng-if="subForm.merchantDisplayName.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 64</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--<div class="form-group"-->
|
||||
<!--ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">-->
|
||||
<!--<label class="control-label col-sm-4">* Payment Type</label>-->
|
||||
<!--<div class="col-sm-8">-->
|
||||
<!--<span class="checkbox-inline">-->
|
||||
<!--<input type="checkbox" ng-model="subMerchantInfo.payment_type_online"> <p>Online Payment</p>-->
|
||||
<!--</span>-->
|
||||
<!--<span class="checkbox-inline">-->
|
||||
|
||||
<!--<input type="checkbox" ng-model="subMerchantInfo.business_type_offline"><p>Offline Payment</p>-->
|
||||
|
||||
<!--</span>-->
|
||||
<!--<span class="checkbox-inline">-->
|
||||
|
||||
<!--<input type="checkbox" ng-model="subMerchantInfo.business_type_agreement"><p>Agreement Payment</p>-->
|
||||
|
||||
<!--</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
|
||||
<label class="control-label col-sm-4"
|
||||
for="alipay_category">* Merchant MCC</label>
|
||||
<div class="col-sm-8" >
|
||||
<input class="form-control" id="alipay_category" required
|
||||
name="alipay_category" readonly
|
||||
ng-model="subMerchantInfo.alipayindustry|partner_alipay_industry"
|
||||
multi-level-select-popup="alipayMccCategory"
|
||||
on-select="onAlipayMccSelect($selected)"
|
||||
chose-one-level="false">
|
||||
<div ng-messages="partnerForm.alipay_category.$error"
|
||||
ng-if="partnerForm.alipay_category.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required
|
||||
Field</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" ng-if="subMerchantInfo.online"
|
||||
ng-class="{'has-error':subForm.websites.$invalid && subForm.websites.$dirty}">
|
||||
<label class="control-label col-sm-4" for="websites_input">* Web site</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.website"
|
||||
type="text" name="websites" id="websites_input" required maxlength="1000">
|
||||
<div ng-messages="subForm.websites.$error" ng-if="subForm.websites.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 1000</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="subMerchantInfo.online"
|
||||
ng-class="{'has-error':subForm.websiteType.$invalid && subForm.websiteType.$dirty}">
|
||||
<label class="control-label col-sm-4">* WebsiteType</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="websiteType" value="WEB" ng-model="subMerchantInfo.websiteType"/>
|
||||
<label>Web</label>
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="websiteType" value="APP" ng-model="subMerchantInfo.websiteType"/>
|
||||
<label>App</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.legalName.$invalid && subForm.legalName.$dirty}">
|
||||
<label class="control-label col-sm-4" for="legalName_input">* Legal Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.legalName"
|
||||
type="text" name="legalName" id="legalName_input" required maxlength="256">
|
||||
<div ng-messages="subForm.legalName.$error" ng-if="subForm.legalName.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.registrationType.$invalid && subForm.registrationType.$dirty}">
|
||||
<label class="control-label col-sm-4">* Registration Type</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="registrationType" value="US_FEDERAL_EIN" ng-model="subMerchantInfo.registrationType"/>
|
||||
<label> (Employer Identification Number) EIN of US merchant.</label>
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="registrationType" value="ENTERPRISE_REGISTRATION_NO" ng-model="subMerchantInfo.registrationType"/>
|
||||
<label>Merchant registration ID.</label>
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="registrationType" value="INDEPENDENT_CONTRACTOR_LICENSE_NO" ng-model="subMerchantInfo.registrationType"/>
|
||||
<label>The license number of ride-share driver or taxi driver.</label>
|
||||
</div>
|
||||
<div class="radio-inline">
|
||||
<input type="radio" name="registrationType" value="OTHER_IDENTIFICATION_NO" ng-model="subMerchantInfo.registrationType"/>
|
||||
<label>Other registration type. </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.registrationNo.$invalid && subForm.registrationNo.$dirty}">
|
||||
<label class="control-label col-sm-4" for="registrationNo_input">* Registration No</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.registrationNo"
|
||||
type="text" name="registrationNo" id="registrationNo_input" required maxlength="64">
|
||||
<div ng-messages="subForm.registrationNo.$error" ng-if="subForm.registrationNo.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 64</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.registrationAddress.$invalid && subForm.registrationAddress.$dirty}">
|
||||
<label class="control-label col-sm-4" for="registrationAddress_input">* Registration Address</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.registrationAddress"
|
||||
type="text" name="registrationAddress" id="registrationAddress_input" required maxlength="256">
|
||||
<div ng-messages="subForm.registrationAddress.$error" ng-if="subForm.registrationAddress.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 店铺名称 -->
|
||||
<div class="form-group" ng-if="!subMerchantInfo.online"
|
||||
ng-class="{'has-error':subForm.storeName.$invalid && subForm.storeName.$dirty}">
|
||||
<label class="control-label col-sm-4" for="storeName_input">* Store Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.storeName"
|
||||
type="text" name="storeName" id="storeName_input" required maxlength="256">
|
||||
<div ng-messages="subForm.storeName.$error" ng-if="subForm.storeName.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 店铺MCC -->
|
||||
<div class="form-group" ng-if="!subMerchantInfo.online"
|
||||
ng-class="{'has-error':partnerForm.storeMCC.$invalid && partnerForm.storeMCC.$dirty}">
|
||||
<label class="control-label col-sm-4"
|
||||
for="storeMCC">*Store MCC</label>
|
||||
<div class="col-sm-8" >
|
||||
<input class="form-control" id="storeMCC" required
|
||||
name="storeMCC" readonly
|
||||
ng-model="subMerchantInfo.storeMCC|partner_alipay_industry"
|
||||
multi-level-select-popup="alipayMccCategory"
|
||||
on-select="onAlipayStoreMccSelect($selected)"
|
||||
chose-one-level="false">
|
||||
<div ng-messages="partnerForm.storeMCC.$error"
|
||||
ng-if="partnerForm.storeMCC.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required
|
||||
Field</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 商店地址-->
|
||||
<div class="form-group" ng-if="!subMerchantInfo.online"
|
||||
ng-class="{'has-error':subForm.storeAddress.$invalid && subForm.storeAddress.$dirty}">
|
||||
<label class="control-label col-sm-4" for="storeAddress_input">* Store Address</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.storeAddress"
|
||||
type="text" name="storeAddress" id="storeAddress_input" maxlength="256" required>
|
||||
<div ng-messages="subForm.storeAddress.$error" ng-if="subForm.storeAddress.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':subForm.businessType.$invalid && subForm.businessType.$dirty}">
|
||||
<label class="control-label col-sm-4"
|
||||
for="businessType_select">* Business Type</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-control" ng-model="subMerchantInfo.businessType"
|
||||
id="businessType_select"
|
||||
name="businessType" required>
|
||||
<option value="">Please Choose</option>
|
||||
<option value="ENTERPRISE" >ENTERPRISE</option>
|
||||
<option value="INDIVIDUAL">INDIVIDUAL</option>
|
||||
</select>
|
||||
<div ng-messages="subForm.businessType.$error" ng-if="subForm.businessType.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"-->
|
||||
<div class="form-group" ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"
|
||||
ng-class="{'has-error':subForm.shareholderName.$invalid && subForm.shareholderName.$dirty}">
|
||||
<label class="control-label col-sm-4" for="shareholderName_input">Shareholder Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.shareholderName"
|
||||
type="text" name="shareholderName" id="shareholderName_input" maxlength="128">
|
||||
<div ng-messages="subForm.shareholderName.$error" ng-if="subForm.shareholderName.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"
|
||||
ng-class="{'has-error':subForm.shareholderId.$invalid && subForm.shareholderId.$dirty}">
|
||||
<label class="control-label col-sm-4" for="shareholderId_input">Shareholder Id</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.shareholderId"
|
||||
type="text" name="shareholderId" id="shareholderId_input" maxlength="128">
|
||||
<div ng-messages="subForm.shareholderId.$error" ng-if="subForm.shareholderId.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-if="subMerchantInfo.businessType == 'INDIVIDUAL'"
|
||||
ng-class="{'has-error':subForm.representativeName.$invalid && subForm.representativeName.$dirty}">
|
||||
<label class="control-label col-sm-4" for="representativeName_input">Representative Name</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.representativeName"
|
||||
type="text" name="representativeName" id="representativeName_input" maxlength="128">
|
||||
<div ng-messages="subForm.representativeName.$error" ng-if="subForm.representativeName.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" ng-if="subMerchantInfo.businessType == 'INDIVIDUAL'"
|
||||
ng-class="{'has-error':subForm.representativeId.$invalid && subForm.representativeId.$dirty}">
|
||||
<label class="control-label col-sm-4" for="representativeId_input">Representative Id</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" ng-model="subMerchantInfo.representativeId"
|
||||
type="text" name="representativeId" id="representativeId_input" maxlength="128">
|
||||
<div ng-messages="subForm.representativeId.$error" ng-if="subForm.representativeId.$dirty">
|
||||
<p class="small text-danger" ng-message="required">Required Field</p>
|
||||
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group margin-bottom margin-top">
|
||||
<button class="btn btn-success" type="button"
|
||||
ng-click="saveAlipayApply(subForm)">Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,152 @@
|
||||
<div class="modal-header">
|
||||
<h4>New Alipay+ APS Rate</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form class="form-horizontal" novalidate name="rate_form">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Clear Days</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<select class="form-control" ng-model="rate.clean_days" id="citySelect" ng-change="changeDays()">
|
||||
<option value="1">T+1</option>
|
||||
<option value="2">T+2</option>
|
||||
<option value="3">T+3</option>
|
||||
</select>
|
||||
<div>{{rateConfig}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- retail interchange fee -->
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':rate_from.retail_interchange_fee_value.$invalid && rate_from.retail_interchange_fee_value.$dirty}">
|
||||
<label class="control-label col-sm-4" for="retail_interchange_fee_value_input">Retail Interchange Fee</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" name="retail_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_interchange_fee_value"
|
||||
min="0.6" max="10" step="0.1" id="retail_interchange_fee_value_input" required>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
<div ng-messages="rate_from.retail_interchange_fee_value.$error" ng-if="rate_from.retail_interchange_fee_value.$dirty">
|
||||
<div class="small text-danger" ng-message="max">
|
||||
<i class="glyphicon glyphicon-alert"></i> No more than 10.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>
|
||||
<!-- retail service fee -->
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':rate_from.retail_service_fee_value.$invalid && rate_from.retail_service_fee_value.$dirty}">
|
||||
<label class="control-label col-sm-4" for="retail_service_fee_value_input">Retail Service Fee</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" name="retail_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_service_fee_value"
|
||||
min="0.6" max="10" step="0.1" id="retail_service_fee_value_input" required>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
<div ng-messages="rate_from.retail_service_fee_value.$error" ng-if="rate_from.retail_service_fee_value.$dirty">
|
||||
<div class="small text-danger" ng-message="max">
|
||||
<i class="glyphicon glyphicon-alert"></i> No more than 10.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>
|
||||
|
||||
<!-- online interchange fee -->
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':rate_from.online_interchange_fee_value.$invalid && rate_from.online_interchange_fee_value.$dirty}">
|
||||
<label class="control-label col-sm-4" for="online_interchange_fee_value_input">Online Interchange Fee</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" name="online_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_interchange_fee_value"
|
||||
min="0.6" max="10" step="0.1" id="online_interchange_fee_value_input" required>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
<div ng-messages="rate_from.online_interchange_fee_value.$error" ng-if="rate_from.online_interchange_fee_value.$dirty">
|
||||
<div class="small text-danger" ng-message="max">
|
||||
<i class="glyphicon glyphicon-alert"></i> No more than 10.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>
|
||||
<!-- online service fee -->
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':rate_from.online_service_fee_value.$invalid && rate_from.online_service_fee_value.$dirty}">
|
||||
<label class="control-label col-sm-4" for="online_service_fee_value_input">Online Service Fee</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<input type="number" name="online_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_service_fee_value"
|
||||
min="0.6" max="10" step="0.1" id="online_service_fee_value_input" required>
|
||||
<div class="input-group-addon">%</div>
|
||||
</div>
|
||||
<div ng-messages="rate_from.online_service_fee_value.$error" ng-if="rate_from.online_service_fee_value.$dirty">
|
||||
<div class="small text-danger" ng-message="max">
|
||||
<i class="glyphicon glyphicon-alert"></i> No more than 10.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>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="active_time_input">Active Date</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="rate.active_time" id="active_time_input"
|
||||
uib-datepicker-popup size="10" placeholder="Active Date"
|
||||
is-open="activeDate.open" ng-click="activeDate.open=true"
|
||||
datepicker-options="{maxDate:rate.expiry_time}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="expire_time_input">Expire Date</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="rate.expiry_time" id="expire_time_input"
|
||||
uib-datepicker-popup size="10" placeholder="Expire Date"
|
||||
is-open="expireDate.open" ng-click="expireDate.open=true"
|
||||
datepicker-options="{minDate:rate.active_time}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="remark_text">Remark</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="rate.remark" id="remark_text" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-success" type="button" ng-click="saveRate(rate_form)" ng-disabled="ctrl.sending">Submit</button>
|
||||
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|