Merge branch 'clientApply' into develop

# Conflicts:
#	src/main/ui/merchant_application.html
#	src/main/ui/static/css/merchant_application.css
#	src/main/ui/static/merchantapplication/merchant_application.js
master
wangning 7 years ago
commit 02903d5055

@ -136,7 +136,11 @@
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>com.github.qcloudsms</groupId>
<artifactId>qcloudsms</artifactId>
<version>1.0.3</version>
</dependency>
<!--jpush start -->
<dependency>
<groupId>cn.jpush.api</groupId>

@ -488,9 +488,9 @@ CREATE TABLE `pmt_directed_bill_code` (
PRIMARY KEY (`bill_code_id`),
KEY `client_id` (`client_id`),
KEY `order_id` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `act_red_packets_customer` ADD COLUMN `rule_max_num_limit` tinyint(1) DEFAULT 1 COMMENT '0:Whole Activity,1day'
ALTER TABLE `act_red_packets_customer` ADD COLUMN `rule_max_num_limit` tinyint(1) DEFAULT 1 COMMENT '0:Whole Activity,1day';
@ -505,4 +505,35 @@ CREATE TABLE `sys_mail_send` (
PRIMARY KEY (`id`,`mail_address`),
KEY `mail_address` (`mail_address`),
KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
alter table sys_clients add column mail_confirm tinyint(1) default '0' COMMENT '0: 未验证1已验证';
CREATE TABLE `sys_client_pre_apply` (
`client_pre_apply_id` int(11) NOT NULL AUTO_INCREMENT,
`password` varchar(20) DEFAULT '',
`contact_person` varchar(50) DEFAULT NULL,
`contact_phone` varchar(20) DEFAULT '',
`contact_email` varchar(255) DEFAULT NULL,
`company_name` varchar(100) DEFAULT NULL,
`abn` varchar(20) DEFAULT NULL,
`short_name` varchar(50) DEFAULT NULL,
`address` varchar(200) DEFAULT NULL,
`suburb` varchar(50) DEFAULT NULL,
`state` varchar(20) DEFAULT NULL,
`postcode` varchar(20) DEFAULT NULL,
`industry` varchar(50) DEFAULT NULL,
`bank_no` varchar(20) DEFAULT NULL,
`bank_name` varchar(50) DEFAULT NULL,
`bsb_no` varchar(6) DEFAULT NULL,
`clean_days` smallint(6) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`agree` tinyint(1) DEFAULT NULL,
`company_phone` varchar(20) DEFAULT NULL,
PRIMARY KEY (`client_pre_apply_id`),
UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
alter table sys_accounts add COLUMN nation_code VARCHAR(5) DEFAULT NULL ;

@ -0,0 +1,228 @@
package au.com.royalpay.payment.manage.application.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;
/**
* Created by yuan on 2018/5/23.
*/
public class ClientPreApplyBean {
@NotEmpty(message = "username can't be null")
private String username;
@NotEmpty(message = "password can't be null")
private String password;
@NotEmpty(message = "contact_person can't be null")
private String contact_person;
@NotEmpty(message = "contact_phone can't be null")
private String contact_phone;
@NotEmpty(message = "contact_email can't be null")
private String contact_email;
@NotEmpty(message = "company_name can't be null")
private String company_name;
@NotEmpty(message = "company_phone can't be null")
private String company_phone;
@NotEmpty(message = "abn can't be null")
private String abn;
@NotEmpty(message = "short_name can't be null")
private String short_name;
@NotEmpty(message = "address can't be null")
private String address;
@NotEmpty(message = "suburb can't be null")
private String suburb;
@NotEmpty(message = "state can't be null")
private String state;
@NotEmpty(message = "postcode can't be null")
private String postcode;
@NotEmpty(message = "industry can't be null")
private String industry;
@NotEmpty(message = "bank_no can't be null")
private String bank_no;
@NotEmpty(message = "bank_name can't be null")
private String bank_name;
@NotEmpty(message = "bsb_no can't be null")
private String bsb_no;
@NotEmpty(message = "clean_days can't be null")
private String clean_days;
@NotEmpty(message = "codeKey can't be null")
private String codeKey;
private boolean agree;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
List<String> keys = new ArrayList<>();
res.keySet().forEach(p-> {
if (StringUtils.isEmpty(res.getString(p).trim())) {
keys.add(p);
}
});
keys.forEach(p->{
res.remove(p);
});
return res;
}
public String getCompany_name() {
return company_name;
}
public void setCompany_name(String company_name) {
this.company_name = company_name;
}
public String getAbn() {
return abn;
}
public void setAbn(String abn) {
this.abn = abn;
}
public String getShort_name() {
return short_name;
}
public void setShort_name(String short_name) {
this.short_name = short_name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getSuburb() {
return suburb;
}
public void setSuburb(String suburb) {
this.suburb = suburb;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getPostcode() {
return postcode;
}
public void setPostcode(String postcode) {
this.postcode = postcode;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public String getBank_no() {
return bank_no;
}
public void setBank_no(String bank_no) {
this.bank_no = bank_no;
}
public String getBank_name() {
return bank_name;
}
public void setBank_name(String bank_name) {
this.bank_name = bank_name;
}
public String getBsb_no() {
return bsb_no;
}
public void setBsb_no(String bsb_no) {
this.bsb_no = bsb_no;
}
public String getClean_days() {
return clean_days;
}
public void setClean_days(String clean_days) {
this.clean_days = clean_days;
}
public boolean isAgree() {
return agree;
}
public void setAgree(boolean agree) {
this.agree = agree;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getContact_person() {
return contact_person;
}
public void setContact_person(String contact_person) {
this.contact_person = contact_person;
}
public String getContact_phone() {
return contact_phone;
}
public void setContact_phone(String contact_phone) {
this.contact_phone = contact_phone;
}
public String getContact_email() {
return contact_email;
}
public void setContact_email(String contact_email) {
this.contact_email = contact_email;
}
public String getCompany_phone() {
return company_phone;
}
public void setCompany_phone(String company_phone) {
this.company_phone = company_phone;
}
public String getCodeKey() {
return codeKey;
}
public void setCodeKey(String codeKey) {
this.codeKey = codeKey;
}
}

@ -0,0 +1,78 @@
package au.com.royalpay.payment.manage.application.beans;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.hibernate.validator.constraints.NotEmpty;
/**
* Created by yuan on 2018/5/23.
*/
public class ClientPreApplyStep1Bean {
@NotEmpty(message = "username can't be null")
private String username;
@NotEmpty(message = "password can't be null")
private String password;
@NotEmpty(message = "contact_person can't be null")
private String contact_person;
@NotEmpty(message = "contact_phone can't be null")
private String contact_phone;
@NotEmpty(message = "contact_email can't be null")
private String contact_email;
@NotEmpty(message = "phoneCodeKey can't be null")
private String phoneCodeKey;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
return res;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getContact_person() {
return contact_person;
}
public void setContact_person(String contact_person) {
this.contact_person = contact_person;
}
public String getContact_phone() {
return contact_phone;
}
public void setContact_phone(String contact_phone) {
this.contact_phone = contact_phone;
}
public String getContact_email() {
return contact_email;
}
public void setContact_email(String contact_email) {
this.contact_email = contact_email;
}
public String getPhoneCodeKey() {
return phoneCodeKey;
}
public void setPhoneCodeKey(String phoneCodeKey) {
this.phoneCodeKey = phoneCodeKey;
}
}

@ -0,0 +1,33 @@
package au.com.royalpay.payment.manage.application.core;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import com.alibaba.fastjson.JSONObject;
public interface SimpleClientApplyService {
void verifyRegisterSMSCode(String codeKey, String phoneNumber);
JSONObject newAccount(NewAccountBean accountBean);
String partnerSignIn(JSONObject account);
String getAndSendSmsCode(String phoneNumber, String nationCode);
String checkOrGenerateRegisterProcessKey(String accountName, String codeKey);
void deleteRegisterProcessKey(String codeKey);
void sendVerifyEmail(String address, int client_id,String username);
String checkOrGenerateVerifyMailKey(String address, String codeKey);
void deleteVerifyMailKey(String codeKey);
void verifyMail(String address, JSONObject loginAccount);
void saveOrUpdateApplyInfo(JSONObject companyBean, String username);
JSONObject getBankInfo(String bsb_no);
void checkAccountName(String contact_phone,String nation_code);
}

@ -0,0 +1,425 @@
package au.com.royalpay.payment.manage.application.core.impls;
import au.com.royalpay.payment.core.mappers.PmtSubMerchantIdMapper;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.mappers.preapply.SysClientPreMapperMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
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.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.signin.beans.LoginInfo;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.manage.system.core.MailGunService;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.mail.SendMail;
import au.com.royalpay.payment.tools.utils.PasswordUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.qcloudsms.SmsSingleSender;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMethod;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
@Service
public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Value("${royalpay.sms.appid:1400094878}")
private int appId;
@Value("${royalpay.sms.appkey:43390d81e20c5191c278fbf4cd275be2}")
private String appKey;
@Resource
private SysConfigManager sysConfigManager;
@Resource
private MailGunService mailGunService;
@Resource
private SpringTemplateEngine thymeleaf;
@Resource
private ClientManager clientManager;
@Resource
private SignInAccountService signInAccountService;
@Resource
private ClientAccountMapper clientAccountMapper;
@Resource
private SysClientPreMapperMapper sysClientPreMapperMapper;
@Resource
private ClientBankAccountMapper clientBankAccountMapper;
@Resource
private ClientMapper clientMapper;
@Resource
private ClientRateMapper clientRateMapper;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private PmtSubMerchantIdMapper pmtSubMerchantIdMapper;
@Resource
private StringRedisTemplate stringRedisTemplate;
private SmsSingleSender sender = null;
private final int REGISTER_CLIENT_TEMPLID = 126978;
private final String REGISTER_CLIENT_PREFIX = "REGISTER_CLIENT";
private final String REGISTER_CLIENT_PROCESS_PREFIX = "REGISTER_CLIENT_PROCESS";
private final String VERIFY_MAIL_PREFIX = "VERIFY_MAIL";
private final List<String> tags = new ArrayList<>();
@PostConstruct
public void init() {
tags.add("account");
sender = new SmsSingleSender(appId, appKey);
}
@Override
public void verifyRegisterSMSCode(String codeKey, String phoneNumber) {
String rediskey = getRegisterClientRedisKey(phoneNumber);
String codeValue = stringRedisTemplate.boundValueOps(rediskey).get();
if (codeValue == null || !codeValue.equals(codeKey)) {
throw new BadRequestException("Verification code has expired or is not correct");
}
stringRedisTemplate.delete(rediskey);
}
@Override
public JSONObject newAccount(NewAccountBean accountBean) {
return null;
}
@Override
public String partnerSignIn(JSONObject account) {
return null;
}
@Override
public String getAndSendSmsCode(String phoneNumber, String nationCode) {
String reidsCheckCodeKey = getRegisterClientRedisKey(phoneNumber);
String value = stringRedisTemplate.boundValueOps(reidsCheckCodeKey).get();
if (StringUtils.isNotEmpty(value)) {
throw new BadRequestException("SMS has been sentPlease check your messages or try again in 3 minutes.");
}
JSONObject sysConfig = sysConfigManager.getSysConfig();
ArrayList<String> param = new ArrayList<>();
String registerClientCode = RandomStringUtils.random(6, false, true);
param.add("RoyalPay");
param.add(registerClientCode);
String expireMin = (String) sysConfig.getOrDefault("sms.verification.code.expire", 3);
param.add(expireMin);
try {
sender.sendWithParam(nationCode.trim(), phoneNumber, REGISTER_CLIENT_TEMPLID, param, "RoyalPay", "", "");
} catch (Exception e) {
e.printStackTrace();
throw new ServerErrorException("Phone number is wrong Please try again");
}
stringRedisTemplate.boundValueOps(getRegisterClientRedisKey(phoneNumber)).set(registerClientCode, Long.parseLong(expireMin), TimeUnit.MINUTES);
return registerClientCode;
}
@Override
public void sendVerifyEmail(String address, int client_id,String username) {
JSONObject client = clientManager.getClientInfo(client_id);
if (client == null) {
throw new BadRequestException("Merchant not found");
}
String key = checkOrGenerateVerifyMailKey(address, null);
Context ctx = new Context();
ctx.setVariable("url", PlatformEnvironment.getEnv().concatUrl("/register/account/mail/" + address + "/verify/" + key + "/jump?username="+username));
final String content = thymeleaf.process("mail/register_application", ctx);
SendMail sendMail = new SendMail();
Set<String> to = new HashSet<>();
to.add(address);
sendMail.setMailTos(to);
sendMail.setFrom("info@mail.royalpay.com.au");
sendMail.setTitle("Royalpay");
sendMail.setContent(content);
sendMail.setTags(tags);
mailGunService.sendMail(sendMail);
}
@Override
public String checkOrGenerateRegisterProcessKey(String accountName, String codeKey) {
Assert.notNull(accountName, "accountName can't be null");
if (StringUtils.isNotEmpty(codeKey)) {
String redisAccountName = stringRedisTemplate.boundValueOps(getRegisterClientProcessRedisKey(codeKey)).get();
if (!accountName.equals(redisAccountName)) {
throw new BadRequestException("Data error,Please re-register for safety.");
} else {
return codeKey;
}
}
String key = RandomStringUtils.random(10, true, false);
stringRedisTemplate.boundValueOps(getRegisterClientProcessRedisKey(key)).set(accountName, 1, TimeUnit.HOURS);
return key;
}
@Override
public void deleteRegisterProcessKey(String codeKey) {
stringRedisTemplate.delete(getRegisterClientProcessRedisKey(codeKey));
}
@Override
public String checkOrGenerateVerifyMailKey(String address, String codeKey) {
Assert.notNull(address, "address can't be null");
if (StringUtils.isNotEmpty(codeKey)) {
String redisAddress = stringRedisTemplate.boundValueOps(getVerifyMailRedisKey(codeKey)).get();
if (!address.equals(redisAddress)) {
throw new BadRequestException("Mail expired");
} else {
return codeKey;
}
}
String key = RandomStringUtils.random(10, true, false);
stringRedisTemplate.boundValueOps(getVerifyMailRedisKey(key)).set(address, 1, TimeUnit.HOURS);
return key;
}
@Override
public void deleteVerifyMailKey(String codeKey) {
stringRedisTemplate.delete(getVerifyMailRedisKey(codeKey));
}
@Override
public void checkAccountName(String contact_phone,String nation_code) {
nation_code = nation_code.trim();
if(!nation_code.startsWith("+")){
nation_code ="+"+nation_code;
}
JSONObject account = clientAccountMapper.findByPhone(contact_phone,nation_code);
if (account != null){
throw new ForbiddenException("用户名已被注册");
}
}
@Override
@Transactional
public void saveOrUpdateApplyInfo(JSONObject applyInfo, String username) {
JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
if (apply == null ){
sysClientPreMapperMapper.save(applyInfo);
}else {
applyInfo.put("client_pre_apply_id", apply.getIntValue("client_pre_apply_id"));
applyInfo.put("update_time", new Date());
sysClientPreMapperMapper.update(applyInfo);
if(applyInfo.getBooleanValue("agree")){
applyerToClient(username);
}
}
}
private void applyerToClient(String username){
Date now = new Date();
JSONObject param = new JSONObject();
param.put("begin_time",DateFormatUtils.format(now,"YYYYMMdd"));
param.put("end_time",DateFormatUtils.format(DateUtils.addDays(now,1),"YYYYMMdd"));
param.put("agree",true);
List<JSONObject> existCount = sysClientPreMapperMapper.query(param);
if(existCount.size()>30){
throw new BadRequestException("New merchant over limit,Please contact us");
}
JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
JSONObject subMerchantId = pmtSubMerchantIdMapper.randomOne();
String clientMoniker = generateClientMoniker();
JSONObject sysClient = new JSONObject();
sysClient.put("company_name",apply.getString("company_name"));
sysClient.put("abn",apply.getString("abn"));
sysClient.put("short_name",apply.getString("short_name"));
sysClient.put("address",apply.getString("address"));
sysClient.put("suburb",apply.getString("suburb"));
sysClient.put("state",apply.getString("state"));
sysClient.put("postcode",apply.getString("postcode"));
sysClient.put("royalpayindustry",apply.getString("industry"));
sysClient.put("contact_person",apply.getString("contact_person"));
sysClient.put("contact_email",apply.getString("contact_email"));
sysClient.put("contact_phone",apply.getString("contact_phone"));
sysClient.put("company_phone",apply.getString("company_phone"));
sysClient.put("client_moniker",clientMoniker);
sysClient.put("create_time",new Date());
sysClient.put("source",4);
sysClient.put("approve_result",2);
sysClient.put("creator",0);
sysClient.put("industry",331);
sysClient.put("merchant_id",subMerchantId.getString("merchant_id"));
sysClient.put("sub_merchant_id",subMerchantId.getString("sub_merchant_id"));
sysClient.put("common_sub_merchant_id",1);
clientMapper.save(sysClient);
int clientId = sysClient.getIntValue("client_id");
JSONObject sysAccount = new JSONObject();
sysAccount.put("username",apply.getString("username"));
sysAccount.put("display_name",apply.getString("username"));
String salt = PasswordUtils.newSalt();
sysAccount.put("salt", salt);
sysAccount.put("password_hash", PasswordUtils.hashPwd(apply.getString("password"), salt));
sysAccount.put("password_aes", PasswordUtils.encryptAESPwd(apply.getString("password")));
sysAccount.put("creator",0);
sysAccount.put("contact_phone",apply.getString("contact_phone"));
sysAccount.put("password_hash",apply.getString("password"));
sysAccount.put("client_id",clientId);
sysAccount.put("create_time",new Date());
sysAccount.put("is_password_expired",0);
sysAccount.put("nation_code","+61");
clientAccountMapper.save(sysAccount);
JSONObject sysBank = new JSONObject();
sysBank.put("client_id",clientId);
sysBank.put("account_no",apply.getString("bank_no"));
sysBank.put("account_name",apply.getString("bank_name"));
sysBank.put("bsb_no",apply.getString("bsb_no"));
JSONObject bankInfo = getBankInfo(apply.getString("bsb_no"));
sysBank.put("bank",bankInfo.getString("bank"));
sysBank.put("city",bankInfo.getString("city"));
sysBank.put("address",bankInfo.getString("address"));
sysBank.put("system",bankInfo.getString("system"));
sysBank.put("postcode",bankInfo.getString("postcode"));
sysBank.put("state",bankInfo.getString("state"));
sysBank.put("branch",bankInfo.getString("branch"));
clientBankAccountMapper.save(sysBank);
JSONObject sysConfig = new JSONObject();
sysConfig.put("client_id",clientId);
sysConfig.put("client_moniker",clientMoniker);
sysConfig.put("clean_days",apply.getIntValue("clean_days"));
sysConfig.put("common_sub_merchant_id",1);
clientConfigMapper.save(sysConfig);
JSONObject sysRate = new JSONObject();
sysRate.put("client_id",clientId);
sysRate.put("clean_days",apply.getIntValue("clean_days"));
sysRate.put("remark","自主申请");
sysRate.put("create_time", new Date());
sysRate.put("update_time", new Date());
sysRate.put("active_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
sysRate.put("expiry_time", DateFormatUtils.format(DateUtils.addYears(new Date(),1), "yyyy-MM-dd"));
JSONObject rateConfig = clientManager.getSysRateConfig();
JSONObject chooseRate = new JSONObject();
if (apply.getIntValue("clean_days") == 1){
chooseRate = rateConfig.getJSONObject("t1");
}
if (apply.getIntValue("clean_days") == 2){
chooseRate = rateConfig.getJSONObject("t2");
}
if (apply.getIntValue("clean_days") == 3){
chooseRate = rateConfig.getJSONObject("t3");
}
sysRate.putAll(chooseRate);
configNewClientRate(sysRate, clientId, "Wechat", "Wechat");
configNewClientRate(sysRate, clientId, "Alipay", "Alipay");
configNewClientRate(sysRate, clientId, "AlipayOnline", "AlipayOnline");
configNewClientRate(sysRate, clientId, "Bestpay", "Bestpay");
configNewClientRate(sysRate, clientId, "jd", "JDpay");
}
private String generateClientMoniker(){
String clientMoniker = RandomStringUtils.random(4, true, true).toUpperCase();
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client != null){
generateClientMoniker();
}
return clientMoniker;
}
private void configNewClientRate(JSONObject config, int clientId, String channel, String rateKey) {
if (config.containsKey(rateKey)) {
JSONObject newConfig = new JSONObject();
newConfig.putAll(config);
newConfig.put("rate_value", config.getBigDecimal(rateKey));
newConfig.put("rate_name", channel);
if (!clientRateMapper.listClientRatesForSaving(clientId, config.getDate("active_time"), config.getDate("expiry_time"),
config.getDoubleValue("rate_value"), config.getInteger("clean_days"), channel).isEmpty()) {
return;
}
List<JSONObject> existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel);
for (JSONObject rateLog : existRate) {
rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1));
clientRateMapper.updateConfig(rateLog);
}
clientRateMapper.saveRate(newConfig);
}
}
@Override
public JSONObject getBankInfo(String bsb_no) {
String url = "https://api.bank.codes/au-bsb/json/ab9379cfdab559509bbdcdd11923489f/" + bsb_no;
JSONObject banInfo = new JSONObject();
try {
HttpRequestResult result = new HttpRequestGenerator(url, RequestMethod.GET).execute();
if (result.isSuccess()) {
banInfo = result.getResponseContentJSONObj();
}
} catch (URISyntaxException | IOException e) {
}
return banInfo;
}
@Override
public void verifyMail(String address, JSONObject loginAccount) {
LoginInfo loginInfo = new LoginInfo();
loginInfo.setLoginId(loginAccount.getString("userName"));
loginInfo.setPassword(loginAccount.getString("password"));
JSONObject account = signInAccountService.accountCheck(loginInfo);
JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id"));
if (!address.equals(client.getString("contact_email"))) {
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
JSONObject record = new JSONObject();
record.put("client_id",client.getIntValue("client_id"));
record.put("mail_confirm",true);
clientMapper.update(record);
}
private String getRegisterClientRedisKey(String phoneNumber){
return REGISTER_CLIENT_PREFIX +phoneNumber;
}
private String getRegisterClientProcessRedisKey(String codeKey) {
return REGISTER_CLIENT_PROCESS_PREFIX + codeKey;
}
private String getVerifyMailRedisKey(String codekey) {
return VERIFY_MAIL_PREFIX + codekey;
}
}

@ -0,0 +1,96 @@
package au.com.royalpay.payment.manage.application.web;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyBean;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyStep1Bean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.http.HttpUtils;
import com.alibaba.fastjson.JSONObject;
import org.springframework.validation.Errors;
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.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@RestController
@RequestMapping("/register")
public class SimpleClientApplyController {
@Resource
private SimpleClientApplyService simpleClientApplyService;
@RequestMapping(value = "/account/check", method = RequestMethod.GET)
public void checkAccountName(@RequestParam String nation_code,@RequestParam String phone) {
simpleClientApplyService.checkAccountName(phone,nation_code);
}
@RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST)
@ResponseBody
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) {
HttpUtils.handleValidErrors(errors);
simpleClientApplyService.verifyRegisterSMSCode(codeKey, accountBean.getContactPhone());
JSONObject account = simpleClientApplyService.newAccount(accountBean);
String statusKey = simpleClientApplyService.partnerSignIn(account);
HttpUtils.setCookie(response, CommonConsts.CODE_KEY, statusKey);
}
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}/jump", method = RequestMethod.GET)
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String address,@RequestParam String username) {
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);
ModelAndView view = new ModelAndView("mail/verify_mail");
view.addObject("codeKey", codeKey);
view.addObject("address", address);
view.addObject("username",username);
return view;
}
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}", method = RequestMethod.POST)
@ResponseBody
public void verifyMail(@PathVariable String codeKey, @PathVariable String address, @RequestBody JSONObject account) {
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);
simpleClientApplyService.verifyMail(address, account);
simpleClientApplyService.deleteVerifyMailKey(codeKey);
}
@RequestMapping(value = "/info/update/{username}/step1", method = RequestMethod.POST)
@ResponseBody
public JSONObject registerCompanyInfoStep1(@PathVariable String username, @RequestBody @Valid ClientPreApplyStep1Bean account) {
JSONObject result = new JSONObject();
simpleClientApplyService.verifyRegisterSMSCode(account.getPhoneCodeKey(), account.getContact_phone());
String codeKey = simpleClientApplyService.checkOrGenerateRegisterProcessKey(username, null);
simpleClientApplyService.saveOrUpdateApplyInfo(account.insertObject(), username);
result.put("codeKey",codeKey);
return result;
}
@RequestMapping(value = "/info/phone/{phone_number}/verify", method = RequestMethod.POST)
@ResponseBody
public JSONObject getAndSendSmsCode(@PathVariable String phone_number, @RequestParam String nation_code) {
JSONObject result = new JSONObject();
result.put("phoneCodeKey", simpleClientApplyService.getAndSendSmsCode(phone_number, nation_code));
return result;
}
@RequestMapping(value = "/info/update/{username}", method = RequestMethod.POST)
public void registerCompanyInfo(@PathVariable String username, @RequestBody @Valid ClientPreApplyBean applyBean) {
simpleClientApplyService.checkOrGenerateRegisterProcessKey(username,applyBean.getCodeKey());
simpleClientApplyService.saveOrUpdateApplyInfo(applyBean.insertObject(), username);
}
@RequestMapping(value = "/info/bank/{bsb_no}", method = RequestMethod.GET)
public JSONObject getBankInfo(@PathVariable String bsb_no, @RequestParam String username, @RequestParam String codeKey) {
simpleClientApplyService.checkOrGenerateRegisterProcessKey(username, codeKey);
return simpleClientApplyService.getBankInfo(bsb_no);
}
}

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.mappers.preapply;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
@AutoMapper(tablename = "sys_client_pre_apply", pkName = "client_pre_apply_id",pkAutoIncrement = true)
public interface SysClientPreMapperMapper {
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject data);
@AutoSql(type = SqlType.INSERT)
void save(JSONObject data);
@AutoSql(type = SqlType.SELECT)
JSONObject findByUserName(@Param("username") String username);
List<JSONObject> query(JSONObject param);
}

@ -26,6 +26,10 @@ public interface ClientAccountMapper {
@AutoSql(type = SqlType.SELECT)
JSONObject findByUsernameForDuplicate(@Param("username") String username);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
JSONObject findByPhone(@Param("contact_phone") String contact_phone,@Param("nation_code")String nation_code);
@AutoSql(type = SqlType.SELECT)
JSONObject findDetail(@Param("account_id") String accountId);

@ -18,6 +18,8 @@ public class NewAccountBean {
private String displayName;
@JSONField(name = "contact_phone")
private String contactPhone;
@JSONField(name = "nation_code")
private String nation_code = "+61";
private int role = PartnerRole.CASHIER.getCode();
public JSONObject toJson() {
@ -70,4 +72,12 @@ public class NewAccountBean {
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
public String getNation_code() {
return nation_code;
}
public void setNation_code(String nation_code) {
this.nation_code = nation_code;
}
}

@ -290,4 +290,6 @@ public interface ClientManager {
JSONObject getCheckClientInfo(int client_id,String account_id, String channel);
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager);
void applyToCompliance(String client_moniker, JSONObject account);
}

@ -778,7 +778,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
if (client.getIntValue("source") == 4) {
sendAuthInitEmail(manager, client);
JSONObject account = accounts.get(0);
sendInitEmail(manager, client, account.getString("username"), "*****");
} else {
if (accounts.size() == 0) {
initAdminUserAndSendEmail(manager, clientMoniker, client);
@ -3149,6 +3150,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return;
}
if (client.getIntValue("open_status") == 4) {
if (client.getIntValue("source")==4 && !StringUtils.isNotEmpty(bd_user_name)){
bd_user_name = "自助开通商户";
}
List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
if (complianceList != null && complianceList.size() > 0) {
for (JSONObject compliance : complianceList) {
@ -3156,7 +3160,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "合规材料已提交",
bd_user_name, "审核材料", "BD已提交合规材料,等待审核");
bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
@ -3391,4 +3395,48 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client);
return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
}
@Override
public void applyToCompliance(String client_moniker, JSONObject client_account) {
JSONObject client = getClientInfoByMoniker(client_moniker);
if (client == null) {
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
if (rate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
if (clientFiles == null || clientFiles.equals("")) {
throw new BadRequestException("The Compliance File Must Be Uploaded!");
}
JSONObject account = getBankAccountByClientId(client.getIntValue("client_id"));
if (account == null) {
throw new BadRequestException("The Partner's Bank Account is not config!");
}
int open_status_from = client.getIntValue("open_status");
OpenStatusModify openStatusModify = new OpenStatusModify(client_account, client_moniker, 4);
if ((client.getIntValue("source") == 1 || client.getIntValue("source") == 2) && client.getIntValue("approve_result") == 2) {
openStatusModify.setApprove_time(new Date());
} else {
openStatusModify.setApprove_time(new Date());
openStatusModify.setApprove_result(3);
}
client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account);
if (client_account != null) {
// sendMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
}
}
}

@ -379,4 +379,10 @@ public class PartnerViewController {
public void confirmSourceAgreeFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientContractService.confirmSourceAgreement(account.getIntValue("client_id"), account.getString("account_id"), "PC");
}
@PartnerMapping(value = "/compliance_audit", method = RequestMethod.POST, roles = PartnerRole.ADMIN)
@ResponseBody
public void commitAudit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.applyToCompliance(account.getString("client_moniker"),account);
}
}

@ -17,6 +17,8 @@ public interface SignInAccountService {
JSONObject managerLoginCheck(LoginInfo loginInfo);
JSONObject accountCheck(LoginInfo loginInfo);
JSONObject clientLoginCheck(LoginInfo loginInfo);
void changeManagerPassword(JSONObject manager, ChangePwdBean change);

@ -166,6 +166,13 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
return account;
}
@Override
public JSONObject accountCheck(LoginInfo loginInfo) {
JSONObject account = managerMapper.findAvailableByLoginId(loginInfo.getLoginId());
validLoginInfo(loginInfo, account);
return account;
}
private void validLoginInfo(LoginInfo loginInfo, JSONObject account) {
if (account == null) {
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));

@ -1,6 +1,6 @@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.schema-name=royalpay_production
spring.datasource.host=192.168.99.100:3306
spring.datasource.host=192.168.0.49:3306
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=root
spring.datasource.password=root

@ -106,3 +106,8 @@ mail.mailgun.domain=mail.royalpay.com.au
mail.mailgun.default.merchantlist=merchants@mail.royalpay.com.au
##############
##短信key
##############
royalpay.sms.appid=1400094878
royalpay.sms.appkey=43390d81e20c5191c278fbf4cd275be2

@ -0,0 +1,18 @@
<?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.preapply.SysClientPreMapperMapper">
<select id="query" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_client_pre_apply
<where>
<if test="#{begin_time}!=null">
and create_time >#{begin_time}
</if>
<if test="#{end_time}!=null">
and create_time &lt; #{end_time}
</if>
<if test="agree">
and agree = #{agree}
</if>
</where>
</select>
</mapper>

@ -0,0 +1,63 @@
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<table cellpadding="0" cellspacing="0" class="email-container" align="center" width="550" style="font-family: Lato, 'Lucida Sans', 'Lucida Grande', SegoeUI, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 22px; color: #444444; text-align: left; border: 1px solid rgb(177, 213, 245); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; width: 550px;">
<tbody><tr>
<td>
<table cellpadding="0" cellspacing="0" class="padding" width="100%" style="padding-left: 40px; padding-right: 40px; padding-top: 30px; padding-bottom: 35px;">
<tbody>
<tr class="logo">
<td align="center">
<table class="logo" style="margin-bottom: 10px;">
<tbody><tr>
<td>
<img src="https://mpay.royalpay.com.au/static/images/logo_new.jpg" height="100" width="100" border="0" style="display: block;">
</td>
</tr>
</tbody></table>
</td>
</tr>
<tr class="content">
<td>
<p style="font-size: 15px; font-weight: normal; line-height: 22px;">Before you can use RoyalPay Cross-border Payment, you need to verify your email address. </p>
</td>
</tr>
<tr>
<td align="center">
<table cellpadding="12" border="0" style="font-family: Lato, 'Lucida Sans', 'Lucida Grande', SegoeUI, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; line-height: 25px; color: #444444; text-align: left;">
<tbody><tr>
<td class="button" style="color: rgb(255, 255, 255); font-size: 16px; line-height: 24px; text-align: center; display: block;">
<a th:href="${url}" style="color: rgb(255, 255, 255); text-align: center; display: block; padding: 12px 20px; height: 100%; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; text-decoration: none; background-color: rgb(43, 136, 217); min-width: 150px;"><strong>Verify mail address</strong></a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<br>
<br>
<p> Once you're ready ro start integrating RoyalPay, we recommend taking a look at our
<a href="https://mpay.royalpay.com.au/docs/en/">docs</a>
<p> if you have any question please contact us</p>
Email: <a href="mailto:info@royalpay.com.au">info@royalpay.com.au</a><br>
Tel: 1300 10 77 50<br>
<div style="width: 40%;padding: 0 15px;float: left;text-align: center;margin-right: 26px;" >
<img style="width: 100%;background-color: black;" src="https://mpay.royalpay.com.au/static/css/img/qr_service.png">
Customer Service
</div>
<div style="width: 40%;padding: 0 15px;float: left;text-align: center;" >
<img style="width: 100%;background-color: black;" src="https://mpay.royalpay.com.au/static/css/img/qr_service.png">
RoyalPay WeChat Official Account
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody></table>

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>RoyalPay | Reset Password</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link href="https://mpay.royalpay.com.au/static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="https://mpay.royalpay.com.au/static/lib/dist/css/AdminLTE.min.css">
<style type="text/css">
#bg {
display: block;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.7;
opacity: .70;
filter: alpha(opacity=70);
}
#show {
display: block;
position: absolute;
top: 50%;
left: 40%;
width: 20%;
padding: 8px;
z-index: 1002;
overflow: auto;
}
</style>
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<p><img src="https://mpay.royalpay.com.au/static/images/rp_logo.svg" style="width:45%"></p>
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Verify Your Mail</p>
<form action="" method="post">
<div class="form-group has-feedback">
<input type="text" id="userName" class="form-control" placeholder="User Names">
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" id="password" name="password" class="form-control" placeholder="password">
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" id="submitEmail-btn" class="btn btn-success btn-block btn-flat">Submit</button>
</div>
</div>
<p style="font-size: smaller">
We need your user name & password to confirm your identity information, please enter it.
</p>
</form>
</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
<script src="https://mpay.royalpay.com.au/static/lib/jquery/jquery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="https://mpay.royalpay.com.au/static/lib/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" data-th-inline="javascript">
$(document).ready(function () {
window.address = /*[[${address}]]*/'';
window.codeKey = /*[[${codeKey}]]*/'';
window.username = /*[[${username}]]*/'';
$('#userName').val(window.username);
$('input').keypress(function (evt) {
if (evt.keyCode == 13) {
$('#login-btn').click();
}
});
$('#submitEmail-btn').click(function () {
var userName = $('#userName').val();
if (userName == null || userName.length == 0) {
alert('请输入用户名');
return;
}
var password = $('#password').val();
if (password == null || password.length == 0) {
alert('请填密码');
return;
}
$("#bg").show();
$("#show").show();
$.ajax({
url: '/register/account/mail/'+window.address+'/verify/'+window.codeKey,
method: 'post',
data: JSON.stringify({userName:userName, password: password}),
contentType: 'application/json',
dataType: 'text',
success: function (resp) {
$("#bg").hide();
$("#show").hide();
alert("Succes");
location.href = 'index.html'
},
error: function (jqXHR) {
$("#bg").hide();
$("#show").hide();
alert(JSON.parse(jqXHR.responseText).message);
}
})
})
})
</script>
<div id="bg" style="display: none"></div>
<div id="show" style="display: none">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0"
aria-valuemax="100" style="width: 100%">
<span class="sr-only">Requesting...</span>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,878 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="no">
<title>RoyalPay | Merchant Application</title>
<meta name="description"
content=" As Australias first WeChat Cross-Border payment gatewayWe are working to build a bridge between Australian merchants and Chinese consumers.Marketing Tools like WeChat Coupons,Membership Cards,Lucky Money are provided to all merchants to Increase sales which is proved effective in the wechat ecology.">
<meta name="keywords"
content="澳洲微信支付、澳洲跨境支付、行业解决方案、澳洲支付、澳洲商圈、微信营销、公众号、Wechat、Official Account、Industry Solution、Cross-Border Payment、Australia Wechat">
<!-- Bootstrap 3.3.5 -->
<link href="static/css/merchant_application.css" rel="stylesheet">
<link href="static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="static/lib/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
<!-- Font Awesome -->
<!-- Ionicons -->
<!-- Theme style -->
<link rel="stylesheet" href="./static/css/index_register.css">
<link rel="stylesheet" href="static/lib/dist/css/AdminLTE.min.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<title>Partner Register</title>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="/static/lib/angularjs/angular.min.js"></script>
<script type="text/javascript" src="/static/lib/angularjs/angular-messages.js"></script>
<script type="text/javascript" src="/static/lib/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/lib/blocs.min.js"></script>
<script type="text/javascript" src="/static/merchantapplication/merchant_application.js"></script>
<style type="text/css">
.register-box-bg {
background-color: rgba(255, 255, 255, 0.9);
box-shadow: 0px 2px 20px 2px rgba(0, 0, 0, 0.3);
filter: alpha(opacity=40);
/*opacity: 0.7;*/
}
.captcha {
width: 30%;
height: 35px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
}
@media (min-width: 544px) {
.content-with {
width: 800px;
}
.register-box {
margin-top: 10%;
}
body .progress {
display: block;
}
body .step_show {
display: none;
}
.button_width{
width: 20%;
}
.input-group .form-control{
position: relative;
z-index: 2;
float: left;
width: 80%;
margin-bottom: 0;
}
}
@media (max-width: 544px) {
body .progress {
display: none;
}
.content_align{
width: 80%;
}
body .step_show {
display: block;
}
.button_width{
width: 35%;
}
.input-group .form-control{
position: relative;
z-index: 2;
float: left;
width: 65%;
margin-bottom: 0;
}
.register-box {
width: 89%;
}
}
</style>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?d7e727bd889ea69d369cba051844dfe5";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body class="pace-done fp-viewing-0" ng-app="applyPartnerApp" ng-controller="applyPartnerCtrl">
<!--[if lte IE 8]>
<span class="lower-ie"></span>
<![endif]-->
<div class="pace pace-inactive">
<div class="pace-progress" data-progress-text="100%" data-progress="99"
style="transform: translate3d(100%, 0px, 0px);">
<div class="pace-progress-inner"></div>
</div>
<div class="pace-activity"></div>
</div>
<div id="main">
<div id="page-index" class="register-page">
<nav id="header" class="navbar navbar-dark navbar-full navbar-bg">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse"
data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://www.royalpay.com.au/">
<img src="/static/images/logo.svg" alt="" class="navbar--logo"
style="width: 275px;height: 32px;display: block;margin-top: 3.2%;">
</a>
</div>
<ul class="nav navbar-nav navbar-right navbar-collapse collapse">
<li id="nav-index" class="nav-item">
<a href="https://www.royalpay.com.au/" class="nav-link">Home</a>
</li>
<li class="nav-item dropdown">
<a role="button" class="nav-link dropdown-toggle" data-toggle="dropdown">Wechat</a>
<ul class="dropdown-menu">
<li><a href="https://www.royalpay.com.au/feature.html" target="_blank">Features</a></li>
<li><a href="https://www.royalpay.com.au/industry.html" target="_blank">Industry</a></li>
<li><a href="https://www.royalpay.com.au/marketing.html" target="_blank">Marketing</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a role="button" class="nav-link dropdown-toggle" data-toggle="dropdown">GATEWAY API</a>
<ul class="dropdown-menu">
<li><a href="https://mpay.royalpay.com.au/docs/en/" target="_blank">En</a></li>
<li><a href="https://mpay.royalpay.com.au/docs/cn/" target="_blank">中文</a></li>
</ul>
</li>
<li class="nav-item">
<a role="button" class="nav-link dropdown-toggle" data-toggle="dropdown">About Us</a>
<ul class="dropdown-menu">
<li><a href="https://www.royalpay.com.au/about.html" target="_blank">About Us</a></li>
<li><a href="https://www.royalpay.com.au/c_news.html">News</a></li>
<li><a href="https://www.royalpay.com.au/c_career.html">Career</a></li>
</ul>
</li>
<li class="nav-item">
<a href="https://www.royalpay.com.au/download.html" class="nav-link">App</a>
</li>
<li class="nav-item hidden-xs hidden-sm">
<a href="https://mpay.royalpay.com.au/login.html" target="_blank"
class="btn btn-success signin">Sign In</a>
</li>
<li class="nav-item hidden-xs hidden-sm">
<a href="https://mpay.royalpay.com.au/partner_register.html" target="_blank"
class="btn btn-success signin">Apply</a>
</li>
</ul>
</div>
</nav>
<div id="fullpage" class="fullpage-wrapper">
<div style="clear: both"></div>
<div class='progress' style="height: 0px">
<div class='progress_inner'>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(1):before':chooseArray[0],'dis_before':chooseArray[0]}">
<label for='step-1'>Account Information</label>
</div>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(2):before':chooseArray[1],'dis_before':chooseArray[1]}">
<label for='step-2'>Company Information</label>
</div>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(3):before':chooseArray[2],'dis_before':chooseArray[2]}">
<label for='step-3'>Bank Account</label>
</div>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(4):before':chooseArray[3],'dis_before':chooseArray[3]}">
<label for='step-4'>Clean Days</label>
</div>
<div class='progress_inner__step' ng-class="{'body .dis_before:nth-child(5):before':chooseArray[4],'dis_before':chooseArray[4]}">
<label for='step-5'>Success</label>
</div>
<input checked='checked' id='step-1' name='step' type='radio' ng-disabled = "!chooseArray[0]" ng-checked="chooseArray[0]" >
<input id='step-2' name='step' type='radio' ng-disabled = "!chooseArray[1]" ng-checked="chooseArray[1]">
<input id='step-3' name='step' type='radio' ng-disabled = "!chooseArray[2]" ng-checked="chooseArray[2]">
<input id='step-4' name='step' type='radio' ng-disabled = "!chooseArray[3]" ng-checked="chooseArray[3]" >
<input id='step-5' name='step' type='radio' ng-disabled = "!chooseArray[4]" ng-checked="chooseArray[4]">
<div class='progress_inner__bar'></div>
<div class='progress_inner__bar--set'></div>
<div class='progress_inner__tabs'>
</div>
<!--<div class='progress_inner__status'>
<div class='box_base'></div>
<div class='box_lid'></div>
<div class='box_ribbon'></div>
<div class='box_bow'>
<div class='box_bow__left'></div>
<div class='box_bow__right'></div>
</div>
<div class='box_item'></div>
<div class='box_tag'></div>
<div class='box_string'></div>
</div>-->
</div>
</div>
<div class="step_show">
<div class="step_header" ng-show="chooseArray[0]">
<img src="static/images/step/num1_1.png">
<span class="text-bold">Account Information</span>
</div>
<div class="step_header" ng-show="chooseArray[1]">
<img src="static/images/step/num1_2.png">
<span class="text-bold">Company Information</span>
</div>
<div class="step_header" ng-show="chooseArray[2]">
<img src="static/images/step/num1_3.png">
<span class="text-bold">Bank Account</span>
</div>
<div class="step_header" ng-show="chooseArray[3]">
<img src="static/images/step/num1_4.png">
<span class="text-bold">Submit Materials</span>
</div>
<div class="step_header" ng-show="chooseArray[4]">
<img src="static/images/step/num1_5.png">
<span class="text-bold">Success</span>
</div>
</div>
<div style="clear: both"></div>
<div class="register-box content-with">
<div class="register-box-body register-box-bg">
<p class="login-box-msg">Easy BusinessEasy Payment</p>
<form novalidate name="accountForm" action="" method="post" ng-show="chooseArray[0]">
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.contact_person.$invalid && accountForm.contact_person.$dirty}">
<input class="form-control" ng-model="partner.contact_person" placeholder="Your Name"
required maxlength="50" name="contact_person">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.contact_email.$invalid && accountForm.contact_email.$dirty}">
<input class="form-control" ng-model="partner.contact_email" placeholder="Email address"
required maxlength="50" name="contact_email" ng-mouseleave="checkEmail()" ng-mousedown="trueEmail =false">
<div style="text-align: left" ng-if="trueEmail">
<p style="text-align: left;font-size: 12px;color: red">The mailbox is incorrect</p>
</div>
</div>
<div class="row">
<div class="form-group col-xs-12"
ng-class="{'has-error':accountForm.contact_phone.$invalid && accountForm.contact_phone.$dirty || name_exist}">
<div class="input-group">
<span class="input-group-addon">+61</span>
<input type="text" name="contact_phone" required ng-model="partner.contact_phone"
class="form-control" style="display: inline"
maxlength="15"
placeholder="Your Phone">
<button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px"
title="发送验证码" ng-click="sendVerificationCode()"
ng-bind="description" ng-disabled="canClick"></button>
</div>
<div style="text-align: left">
<span style="text-align: left;font-size: 12px;" class="text-info">phone number is also your login id</span>
</div>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.code.$invalid && accountForm.code.$dirty}">
<input class="form-control" type="number" ng-model="partner.phoneCodeKey" placeholder="Code"
required maxlength="10" name="code">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.password.$invalid && accountForm.password.$dirty}">
<input type="password" class="form-control" ng-model="partner.password" placeholder="Password" required
minlength="6" maxlength="12" name="password">
<div style="text-align: left">
<span style="text-align: left;font-size: 12px;" class="text-info">6 to 12 characters, case sensitive</span>
</div>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':(accountForm.rePassword.$invalid && accountForm.rePassword.$dirty) ||partner.rePassword != partner.password}">
<input type="password" class="form-control" ng-model="partner.rePassword" placeholder="Confirm Password"
required
minlength="6" maxlength="12" name="rePassword">
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveStep1(accountForm,1)" ng-disabled="accountForm.$invalid ||trueEmail">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</form>
<form novalidate name="companyForm" action="" method="post" ng-show="chooseArray[1]">
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_name.$invalid && companyForm.company_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_name" name="company_name"
placeholder="Company Name" required maxlength="80">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.abn.$invalid && companyForm.abn.$dirty}">
<input class="form-control" ng-model="partner.abn" placeholder="ABN"
required maxlength="50" name="abn">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.short_name.$invalid && companyForm.short_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.short_name" name="short_name"
placeholder="Merchant Name" required maxlength="80">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_phone.$invalid && companyForm.company_phone.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_phone" name="company_phone"
placeholder="Company phone" required maxlength="80">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.address.$invalid && companyForm.address.$dirty}">
<textarea class="form-control" ng-model="partner.address" placeholder="Address"
name="address" required maxlength="100"></textarea>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.suburb.$invalid && companyForm.suburb.$dirty}">
<input class="form-control" ng-model="partner.suburb" placeholder="Suburb" required
maxlength="50" name="suburb">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.state.$invalid && companyForm.state.$dirty}">
<select class="form-control" name="state"
ng-model="partner.state"
id="state-input" required
ng-options="state.value as state.label for state in states">
<option value="">State</option>
</select>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.postcode.$invalid && companyForm.postcode.$dirty}">
<input class="form-control" ng-model="partner.postcode" placeholder="Postcode" required
maxlength="50" name="postcode">
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<div class="form-group has-feedback" ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<div class="dropdown">
<input id="dLabel" data-toggle="dropdown" data-target="#" class="form-control"
ng-model="industryLable" placeholder="Industry" required
maxlength="50" name="royalpayindustry" readonly="readonly">
<ul class="dropdown-menu multi-level" role="menu" aria-labelledby="dropdownMenu">
<li class="dropdown-submenu" ng-repeat="industry in royalpayindustry">
<a tabindex="-1" ng-model="industry.mccCode">{{industry.label}}</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="javascript:;" ng-repeat="child in industry.children" ng-click="chooseIndustry(child)">{{child.label}}</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- <div class="form-group has-feedback"
ng-class="{'has-error':companyForm.royalpayindustry.$invalid && companyForm.royalpayindustry.$dirty}">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
</div>-->
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(companyForm,2)" ng-disabled="companyForm.$invalid">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</form>
<form novalidate name="bankForm" action="" method="post" ng-show="chooseArray[2]">
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_no.$invalid && bankForm.account_no.$dirty}">
<input class="form-control" ng-model="partner.bank_no" placeholder="Account No"
required
name="account_no">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_name.$invalid && bankForm.account_name.$dirty}">
<input class="form-control" ng-model="partner.bank_name" placeholder="Account Name"
required name="account_name">
</div>
<div class="row">
<div class="form-group col-xs-12"
ng-class="{'has-error':bankForm.bsb_no.$invalid && bankForm.bsb_no.$dirty}">
<input class="form-control" ng-model="partner.bsb_no" placeholder="BSB No" required
name="bsb_no" style="width: 80%;display: inline">
<button type="button" class="btn btn-success" style="width:20%;display:inline;height: 34px;float: right;border-radius: 0px"
title="Search" ng-click="searchBankInfo(partner.bsb_no)">Search</button>
</div>
</div>
<div style="text-align: left" ng-if="showBankInfo">
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.bank.$invalid && bankForm.bank.$dirty}">
<p class="form-control-static">&nbsp; Bank: <em>bank{{bankaccount.bank}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.city.$invalid && bankForm.city.$dirty}">
<p class="form-control-static">&nbsp; City: <em>{{bankaccount.city}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.address.$invalid && bankForm.address.$dirty}">
<p class="form-control-static">&nbsp; Address: <em>{{bankaccount.address}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.system.$invalid && bankForm.bank_system.$dirty}">
<p class="form-control-static">&nbsp; system: <em>{{bankaccount.system}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.postcode.$invalid && bankForm.bank_postcode.$dirty}">
<p class="form-control-static">&nbsp; postcode: <em>{{bankaccount.postcode}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.state.$invalid && bankForm.bank_state.$dirty}">
<p class="form-control-static">&nbsp; state: <em>{{bankaccount.state}}</em></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.branch.$invalid && bankForm.branch.$dirty}">
<p class="form-control-static">&nbsp; branch: <em>{{bankaccount.branch}}</em></p>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(bankForm,3)" ng-disabled="bankForm.$invalid">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</form>
<form novalidate name="cleanForm" action="" method="post" ng-show="chooseArray[3]">
<div class="form-group has-feedback"
ng-class="{'has-error':cleanForm.clean_days.$invalid && cleanForm.clean_days.$dirty}">
<select class="form-control" ng-model="partner.clean_days" id="citySelect"
ng-change="changeDays(partner.clean_days)" name="clean_days" required
ng-options="cleanDay.value as cleanDay.label for cleanDay in cleanDays">
<option value="">Clean Days</option>
</select>
</div>
<div style="text-align: left" ng-if="showCleanDay">
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; WeChat Rate Value: <em>{{rate.wechat_rate_value}}%</em></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Retail): <em>{{rate.alipay_rate_value}}%</em></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Online): <em>{{rate.alipayonline_rate_value}}%</em></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Bestpay Rate Value: <em>{{rate.bestpay_rate_value}}%</em></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; JD Rate Value: <em>{{rate.jd_rate_value}}%</em></p>
</div>
</div>
<div class="form-group has-feedback">
<div class="checkbox agree_left agree-text">
<label><input type="checkbox" ng-model="partner.agree" value="1">Agree to Terms & Conditions</label>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(cleanForm,4)" ng-disabled="cleanForm.$invalid || !partner.agree" >Submit
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</form>
<!-- <form novalidate name="materialsForm" action="" method="post" ng-show="chooseArray[4]">
<div class="form-horizontal" style="text-align: left">
<div class="form-group">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-5">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*" ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo"
class="thumbnail img-size col-sm-9">
</div>
<div class="col-sm-5">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo"
class="thumbnail img-size col-sm-9">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Logo</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button" ngf-select="uploadLogo($file)"
accept="image/*" ngf-max-size="1MB">
<i class="fa fa-upload"></i> Upload Logo
</button>
</div>
<uib-progressbar value="logoProgress.value" ng-if="logoProgress"></uib-progressbar>
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* bank statement</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_bank_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{file.client_bank_file}}" target="_blank"><i
class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none"
ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="bankFileProgress.value"
ng-if="bankFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}">
<img ng-src="{{file.client_bank_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488859920633_5ruVtDa30yY2ytBSDAAqxg0Ob2nreh.jpeg">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Certificate of Registration</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_company_file" role="button"
class="btn-group btn btn-warning" type="button"
ng-href="{{file.client_company_file}}" target="_blank"><i
class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none"
ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="companyFileProgress.value"
ng-if="companyFileProgress"></uib-progressbar>
<a ng-if="companyIsImage" ng-href="{{file.client_company_file}}" target="_blank">
<img ng-src="{{file.client_company_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-6">
<p>Example公司请提供以下文件图片</p>
<img class="col-xs-12 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488865011738_mW91ylSb5V1NJYu8jxvBPGNN49Zyel.jpeg">
&lt;!&ndash;<img class="col-sm-12" src="https://file.royalpay.com.au/open/2017/03/07/1488864017622_BppIfz1yhMeoF0Z49rHt2gZIfVOihA.jpeg">&ndash;&gt;
</div>
<div class="col-sm-6">
<p>sole
trade个体户),partnership合伙,trust信托请在http://abr.business.gov.au将查询结果截图上传</p>
<img class="col-sm-12 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488860564017_37spL6phUySM27oRtO4cQ7FOJblYJ6.jpeg">
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* ID </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadIDFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_id_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{file.client_id_file}}" target="_blank"><i
class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none"
ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="idFileProgress.value"
ng-if="idFileProgress"></uib-progressbar>
<a ng-if="idIsImage" ng-href="{{file.client_id_file}}" target="_blank">
<img ng-src="{{file.client_id_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-6">
<p>Example请保证图片(护照或驾照)信息清晰可见,如下图</p>
<img class="col-xs-12 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725651779_OPiqOP1dGnTpaxPsCR3P9lVrp4384b.jpg">
</div>
<div class="col-sm-6">
<br/>
<br/>
<img class="col-sm-12 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725678615_Bv2tzUtihY5U6YK9ScveXzKkVWOnrF.jpg">
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* Agreement</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadAgreementFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_agree_file" role="button"
class="btn-group btn btn-warning" type="button"
ng-href="{{file.client_agree_file}}" target="_blank"><i
class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="agreementFileProgress.value"
ng-if="agreementFileProgress"></uib-progressbar>
<a ng-if="agreeIsImage" target="_blank" ng-href="{{file.client_agree_file}}">
<img ng-src="{{file.client_agree_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/15/1497454561900_5mf5KC4WGkXyFynv025JlTukAq8BqX.png">
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Application Form(optional)</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_apply_file" role="button"
class="btn-group btn btn-warning" type="button"
ng-href="{{file.client_apply_file}}" target="_blank"><i
class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" style="float: none"
aria-hidden="true" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="bankFileProgress.value"
ng-if="applyFileProgress"></uib-progressbar>
<a ng-if="applyIsImage" target="_blank" ng-href="{{file.client_apply_file}}">
<img ng-src="{{file.client_apply_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6 img-responsive" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/15/1497454548133_uSn0TP2uQNLEfnMB57CMrxG2jTOWHG.png">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="submit(materialsForm)">Submit
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</form>-->
<form ng-show="chooseArray[4]">
<div class="success_wrapper">
<div class="success_img">
<img height="40" width="40" src="static/images/step/gou.png">
</div>
<div class="success_text">
<div>恭喜注册成功</div>
<div class="success_text2">欢迎使用RoyalPay收单服务</div>
</div>
</div>
<div class="success_content">
<div class="content_align">
<div>注意事项:</div>
<p>1、需要完成 合规材料的提交具体请查看appxx菜单xx功能</p>
<p>2、在完成合规认证之前不会对交易进行清算</p>
<p>3、账户名和密码以及相关信息已发送至账户邮箱请妥善保护自己的密码及时进行修改。</p>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom2">
<button type="button" id="login-btn7" class="btn btn-success btn-block btn-flat"
onclick="window.location.href='/login.html'">
{{seconds}}秒后,将跳转登录页, 或点击直接跳转登录页
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
class="small text-danger">{{resError}}</p>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<div class="modal fade">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close"><span
aria-hidden="true">&times;</span>
<span class="sr-only">Close</span></button>
<h4 class="modal-title">Success</h4>
</div>
<div class="modal-body">
Registered merchant application has been submitted successfully
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close
</button>
</div>
</div>
</div>
</div>
</div>
<section class="section section-six fp-auto-height footer">
<div class="container">
<div class="row margin-bottom">
<div class="col-md-4 footer-item">
CONTACT US
<hr>
Level 14<br>
383 Kent Street<br>
Sydney NSW 2000<br>
<br>
Level 11<br>
15 William Street<br>
Melbourne VIC 3000<br>
<br>
1300-10-77-50<br>
03 9448 8865<br>
info@royalpay.com.au
</div>
<div class="col-md-4 sitemap footer-item">
SITE MAP
<hr>
<div class="row">
<div class="col-xs-6">
<p><a href="/">RoyalPay</a></p>
<p><a href="https://mpay.royalpay.com.au/docs/en/">Gateway API</a></p>
<p><a href="https://www.royalpay.com.au/industry.html">Industry Solution</a></p>
<p><a href="https://www.royalpay.com.au/marketing.html">Marketing Service</a></p>
</div>
<div class="col-xs-6">
<p><a href="https://www.royalpay.com.au/about.html">About Us</a></p>
<p><a href="https://www.royalpay.com.au/c_news.html">News</a></p>
<p><a href="https://www.royalpay.com.au/c_career.html">Career</a></p>
<p><a href="https://www.royalpay.com.au/download.html">Downloads</a></p>
</div>
</div>
</div>
<div class="col-md-4 footer-item">
SUPPORT
<hr>
<div class="row">
<div class="col-xs-6 qr-box">
<img src="static/css/img/qr_royalpay.png">
RoyalPay WeChat Official Account
</div>
<div class="col-xs-6 qr-box">
<img src="static/css/img/qr_service.png">
Customer Service
</div>
</div>
</div>
</div>
</div>
<div class="copyright">
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
© 2016 Tunnel Show Pty. Ltd. | Representative of AFSL licensee 448066
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
<div id="fp-nav" class="right"></div>
<div id="cli_dialog_div"></div>
</body>
</html>

@ -0,0 +1,471 @@
body .progress_inner #step-5:checked + div + div + div + div > .box_base, body .progress_inner #step-4:checked + input + div + div + div + div > .box_base, body .progress_inner #step-2:checked + input + input + input + div + div + div + div > .box_base, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_base, body .progress_inner #step-1:checked + input + input + input + input + div + div + div + div > .box_base {
top: 50%;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_item, body .progress_inner #step-4:checked + input + div + div + div + div > .box_item, body .progress_inner #step-2:checked + input + input + input + div + div + div + div > .box_item, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_item, body .progress_inner #step-1:checked + input + input + input + input + div + div + div + div > .box_item {
top: -30px;
left: 0px;
opacity: 0;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_lid, body .progress_inner #step-4:checked + input + div + div + div + div > .box_lid, body .progress_inner #step-2:checked + input + input + input + div + div + div + div > .box_lid {
top: -20px;
left: 0px;
opacity: 0;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_item, body .progress_inner #step-4:checked + input + div + div + div + div > .box_item, body .progress_inner #step-2:checked + input + input + input + div + div + div + div > .box_item {
top: -10px;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_item, body .progress_inner #step-4:checked + input + div + div + div + div > .box_item, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_item {
top: 10px;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_lid, body .progress_inner #step-4:checked + input + div + div + div + div > .box_lid, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_lid {
top: -1px;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_ribbon, body .progress_inner #step-4:checked + input + div + div + div + div > .box_ribbon, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_ribbon {
top: 70%;
left: 0px;
opacity: 0;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_bow, body .progress_inner #step-4:checked + input + div + div + div + div > .box_bow, body .progress_inner #step-3:checked + input + input + div + div + div + div > .box_bow {
top: 0px;
left: 0px;
opacity: 0;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_ribbon, body .progress_inner #step-4:checked + input + div + div + div + div > .box_ribbon {
top: 50%;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_bow, body .progress_inner #step-4:checked + input + div + div + div + div > .box_bow {
top: -10px;
left: 0px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_tag {
top: 10px;
left: 20px;
opacity: 1;
}
body .progress_inner #step-5:checked + div + div + div + div > .box_string {
top: 10px;
left: 20px;
opacity: 1;
}
* {
box-sizing: border-box;
}
body .progress_inner__step:before, body .progress_inner, body .progress_inner__status .box_base, body .progress_inner__status .box_item, body .progress_inner__status .box_ribbon, body .progress_inner__status .box_bow, body .progress_inner__status .box_bow__left, body .progress_inner__status .box_bow__right, body .progress_inner__status .box_tag, body .progress_inner__status .box_string {
position: absolute;
left: 0;
right: 0;
top: 16em;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
margin: auto;
}
body .progress_inner__bar, body .progress_inner__bar--set {
height: 6px;
left: 10%;
background: -webkit-repeating-linear-gradient(45deg, #1ea4ec, #1ea4ec 4px, #1f8bc5 4px, #1f8bc5 10px);
background: repeating-linear-gradient(45deg, #1ea4ec, #1ea4ec 4px, #1f8bc5 4px, #1f8bc5 10px);
-webkit-transition: width 800ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
transition: width 800ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
border-radius: 6px;
width: 0;
position: relative;
z-index: -1;
}
body .progress_inner__step:before {
width: 30px;
height: 30px;
color: #70afd0;
background: white;
line-height: 30px;
border: 3px solid #a6cde2;
font-size: 12px;
top: 3px;
border-radius: 100%;
-webkit-transition: all .4s;
transition: all .4s;
cursor: pointer;
pointer-events: none;
}
body .progress_inner__step {
width: 20%;
font-size: 14px;
padding: 0 10px;
-webkit-transition: all .4s;
transition: all .4s;
float: left;
text-align: center;
position: relative;
}
body .progress_inner__step label {
padding-top: 50px;
top: -20px;
display: block;
position: relative;
cursor: pointer;
}
/*body .progress_inner__step:hover {
color: white;
}
body .progress_inner__step:hover:before {
color: white;
background: #1ea4ec;
}*/
body {
font-family: "Nunito", sans-serif;
background: #a6cde2;
color: #2e6c8e;
text-align: center;
font-weight: 900;
}
body .progress_inner {
height: 200px;
width: 1000px;
}
body .progress_inner #step-5:checked + div {
width: 80%;
}
body .progress_inner #step-5:checked + div + div + div > .tab:nth-of-type(5) {
opacity: 1;
top: 0;
}
body .progress_inner #step-5:checked + div + div + div + div {
right: 10%;
}
body .progress_inner #step-4:checked + input + div {
width: 60%;
}
body .progress_inner #step-4:checked + input + div + div + div > .tab:nth-of-type(4) {
opacity: 1;
top: 0;
}
body .progress_inner #step-4:checked + input + div + div + div + div {
right: 30%;
}
body .progress_inner #step-3:checked + input + input + div {
width: 40%;
}
body .progress_inner #step-3:checked + input + input + div + div + div > .tab:nth-of-type(3) {
opacity: 1;
top: 0;
}
body .progress_inner #step-3:checked + input + input + div + div + div + div {
right: 50%;
}
body .progress_inner #step-2:checked + input + input + input + div {
width: 20%;
}
body .progress_inner #step-2:checked + input + input + input + div + div + div > .tab:nth-of-type(2) {
opacity: 1;
top: 0;
}
body .progress_inner #step-2:checked + input + input + input + div + div + div + div {
right: 70%;
}
body .progress_inner #step-1:checked + input + input + input + input + div {
width: 0%;
}
body .progress_inner #step-1:checked + input + input + input + input + div + div + div > .tab:nth-of-type(1) {
opacity: 1;
top: 0;
}
body .progress_inner #step-1:checked + input + input + input + input + div + div + div + div {
right: 90%;
}
body .progress_inner__step:nth-of-type(1):before {
content: "1";
}
body .progress_inner__step:nth-of-type(2):before {
content: "2";
}
body .progress_inner__step:nth-of-type(3):before {
content: "3";
}
body .progress_inner__step:nth-of-type(4):before {
content: "4";
}
body .progress_inner__step:nth-of-type(5):before {
content: "5";
}
body .progress_inner__step:nth-of-type(6):before {
content: "6";
}
body .progress_inner__bar--set {
width: 80%;
top: -6px;
background: #70afd0;
position: relative;
z-index: -2;
}
body .progress_inner__tabs .tab {
opacity: 0;
position: absolute;
top: 40px;
text-align: center;
margin-top: 80px;
box-shadow: 0px 2px 1px #80b7d5;
padding: 30px;
background: white;
border-radius: 10px;
-webkit-transition: all .2s;
transition: all .2s;
}
body .progress_inner__tabs .tab h1 {
margin: 0;
}
body .progress_inner__tabs .tab p {
font-weight: 400;
opacity: 0.8;
}
body .progress_inner__status {
width: 40px;
height: 40px;
top: -65px;
-webkit-transition: right 800ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
transition: right 800ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
-webkit-transform: translateX(50%);
transform: translateX(50%);
position: absolute;
}
body .progress_inner__status div {
opacity: 0;
-webkit-transition: all 600ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
transition: all 600ms cubic-bezier(0.915, 0.015, 0.3, 1.005);
-webkit-transition-delay: 300ms;
transition-delay: 300ms;
}
body .progress_inner__status div {
position: absolute;
}
body .progress_inner__status .box_base {
background: -webkit-repeating-linear-gradient(45deg, #986c5d, #986c5d 2px, #775144 2px, #775144 4px);
background: repeating-linear-gradient(45deg, #986c5d, #986c5d 2px, #775144 2px, #775144 4px);
width: 36px;
height: 40px;
z-index: 1;
border-radius: 1px;
}
body .progress_inner__status .box_lid {
width: 40px;
height: 13.33333px;
background: #775144;
z-index: 2;
border-radius: 1px;
top: 0;
}
body .progress_inner__status .box_item {
width: 20px;
height: 20px;
background: #be69d2;
z-index: 0;
border-radius: 4px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
body .progress_inner__status .box_ribbon {
width: 10px;
height: 42px;
background: #ee0f29;
z-index: 4;
border-radius: 1px;
}
body .progress_inner__status .box_bow__left, body .progress_inner__status .box_bow__right {
width: 6px;
height: 10px;
background: #be0c21;
position: absolute;
z-index: 3;
opacity: 1;
border-radius: 1px;
}
body .progress_inner__status .box_bow {
top: -6px;
z-index: 1;
-webkit-transition-delay: 500ms;
transition-delay: 500ms;
}
body .progress_inner__status .box_bow__left {
left: 6px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
body .progress_inner__status .box_bow__right {
left: -4px;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
body .progress_inner__status .box_tag {
width: 20px;
height: 10px;
background: #487ac7;
z-index: 4;
-webkit-transform: rotate(-10deg) translateX(-40px) translateY(0px);
transform: rotate(-10deg) translateX(-40px) translateY(0px);
border-radius: 2px;
-webkit-transition-delay: 500ms;
transition-delay: 500ms;
}
body .progress_inner__status .box_string {
width: 17px;
height: 2px;
background: #343434;
z-index: 4;
-webkit-transform: rotate(-39deg) translateX(-22px) translateY(-12px);
transform: rotate(-39deg) translateX(-22px) translateY(-12px);
}
body .progress_inner input[type="radio"] {
display: none;
}
.step_header{
text-align: left;
padding-left:7%;
}
.step_header img{
height: 30px;
width: 30px;
}
.success_wrapper{
margin-top: 30px;
text-align: center;
}
.success_img{
display: inline-block;
}
.success_img img{
vertical-align: baseline;
}
.success_text{
text-align: left;
display: inline-block;
margin-left: 14px;
}
.success_text2{
font-family: PingFangSC-Regular;
font-size: 15px;
color: #8B919D;
letter-spacing: 0px;
}
.success_content{
margin-top: 50px;
font-family: PingFangSC-Regular;
font-size: 15px;
color: #8B919D;
letter-spacing: 0px;
}
.content_align{
margin:0 auto;
width:50%;
text-align:left;
}
.margin-bottom2{
margin-top: 120px;
}
.agree-text{
font-family: SanFranciscoText-Regular;
font-size: 15px;
color: #FF6600;
letter-spacing: 0px;
}
.agree-to{
border: 1px solid #FF6600;
padding: 6px 8px 6px 8px;
color: grey;
cursor: pointer;
}
.agree_left{
text-align: left;
}
body .dis_before{
color: white;
}
body .dis_before:nth-child(1):before{
color: white;
background: #1ea4ec;
}
body .dis_before:nth-child(2):before{
color: white;
background: #1ea4ec;
}
body .dis_before:nth-child(3):before{
color: white;
background: #1ea4ec;
}
body .dis_before:nth-child(4):before{
color: white;
background: #1ea4ec;
}
body .dis_before:nth-child(5):before {
color: white;
background: #1ea4ec;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover > a:after {
border-left-color: #fff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
/*.progress_inner__step:before{
background: #1ea4ec;
}
.step_submit_color{
color: white;
}*/

@ -0,0 +1,304 @@
angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', ['$scope', '$http','$interval', function ($scope, $http,$interval) {
var countryMap = [{
"label": "AUS",
"value": "AUS"
}, {
"label": "CHN",
"value": "CHN"
}];
var cleanDays = [{
"label": "T+1",
"value": "1"
}, {
"label": "T+2",
"value": "2"
}, {
"label": "T+3",
"value": "3"
}];
var stateMap = [
{
"label": "ACT",
"value": "ACT"
},
{
"label": "NSW",
"value": "NSW"
},
{
"label": "NT",
"value": "NT"
},
{
"label": "QLD",
"value": "QLD"
},
{
"label": "SA",
"value": "SA"
},
{
"label": "TAS",
"value": "TAS"
},
{
"label": "VIC",
"value": "VIC"
},
{
"label": "WA",
"value": "WA"
}
];
$scope.name_exist = false;
$scope.states = angular.copy(stateMap);
$scope.countries = angular.copy(countryMap);
$scope.cleanDays = angular.copy(cleanDays);
$scope.seconds = 6;
$scope.canClick=false;
$scope.description = "Send Code";
$scope.partner = {nation_code:"+61"};
$scope.bankaccount = {};
$scope.rate = {};
$scope.phone_code_timer=$interval(function () {}, 1000);
$scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
$scope.royalpayindustry = resp.data;
})
};
$scope.loadRoyalpayindustry();
$scope.checkUserName = function (phone,nation_code) {
if(phone && nation_code){
$http.get('/register/account/check?phone='+phone+'&nation_code='+nation_code).then(function (resp) {
$scope.name_exist = false;
}, function (resp) {
if (resp.data.status == 403){
$scope.name_exist = true;
}
})
}
};
$scope.chooseArray = new Array(true, false, false, false, false);
$scope.changeChoose = function (index) {
$scope.repartner = {};
angular.forEach($scope.partner, function(value, key) {
if((value+'').trim()!=''){
$scope.repartner[key] = value;
}
});
$scope.partner = $scope.repartner;
$scope.chooseArray = new Array(false, false, false, false, false);
$scope.chooseArray[index] = true;
};
$scope.getRateConfig = function () {
$http.get('/sys/partners/sys_rates').then(function (resp) {
$scope.sysRateConfig = resp.data;
}, function (resp) {
})
};
$scope.sendPhoneCodeTime = function(){
var second=59;
$scope.phone_code_timer = $interval(function () {
if(second<=0){
$interval.cancel($scope.phone_code_timer);
second=59;
$scope.description="Send Code";
$scope.canClick=false;
}else{
$scope.description=second+"s后重发";
second--;
$scope.canClick=true;
}
}, 1000);
};
$scope.goToLogin = function () {
var timer = $interval(function(){
$scope.seconds = $scope.seconds -1;
if ($scope.seconds == 0) {
location.href = '/login.html';
}
},1000)
};
$scope.checkEmail = function () {
$scope.trueEmail = false;
if($scope.partner.contact_email){
var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
if(!reg.test($scope.partner.contact_email)){
$scope.trueEmail = true;
}else {
$scope.trueEmail = false;
}
}
};
$scope.sendVerificationCode = function () {
$scope.initErrorMsg();
$scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code)
$scope.sendPhoneCodeTime();
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) {
}, function (resp) {
if(resp.data.status+0 ==500) {
$interval.cancel($scope.phone_code_timer);
}
$scope.resError = resp.data.message;
});
};
$scope.chooseIndustry = function (industry) {
$scope.partner.industry = industry.mccCode;
$scope.industryLable = industry.label;
};
$scope.searchBankInfo = function (bsb_no) {
$scope.initErrorMsg();
if (bsb_no != null && bsb_no != "") {
$scope.showBankInfo = false;
$http.get('/register/info/bank/' + bsb_no).then(function (resp) {
$scope.bankInfo = resp.data;
$scope.bankaccount.bank = $scope.bankInfo.bank;
$scope.bankaccount.city = $scope.bankInfo.city;
$scope.bankaccount.address = $scope.bankInfo.address;
$scope.bankaccount.system = $scope.bankInfo.system;
$scope.bankaccount.postcode = $scope.bankInfo.postcode;
$scope.bankaccount.state = $scope.bankInfo.state;
$scope.bankaccount.branch = $scope.bankInfo.branch;
$scope.showBankInfo = true;
}, function (resp) {
$scope.showBankInfo = false;
});
} else {
$scope.resError = "请先填写BSB No";
}
};
$scope.changeDays = function (clean_days) {
if (clean_days) {
$scope.showCleanDay = false;
switch (clean_days) {
case '1': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t1.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t1.Alipay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t1.AlipayOnline);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t1.Bestpay);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t1.JDpay);
$scope.showCleanDay = true;
break;
}
case '2': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t2.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t2.Alipay);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t2.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t2.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t2.JDpay);
$scope.showCleanDay = true;
break;
}
case '3': {
$scope.rate.wechat_rate_value = parseFloat($scope.sysRateConfig.t3.Wechat);
$scope.rate.alipay_rate_value = parseFloat($scope.sysRateConfig.t3.Alipay);
$scope.rate.bestpay_rate_value = parseFloat($scope.sysRateConfig.t3.Bestpay);
$scope.rate.alipayonline_rate_value = parseFloat($scope.sysRateConfig.t3.AlipayOnline);
$scope.rate.jd_rate_value = parseFloat($scope.sysRateConfig.t3.JDpay);
$scope.showCleanDay = true;
break;
}
}
}else {
$scope.showCleanDay = false;
}
};
$scope.saveStep1 = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
$scope.initParam();
$scope.partner.username = $scope.partner.contact_phone;
$http.post('/register/info/update/' + $scope.partner.username +'/step1', $scope.partner).then(function (resp) {
$scope.changeChoose(index);
$scope.partner.codeKey = resp.data.codeKey;
}, function (resp) {
$scope.resError = resp.data.message;
});
};
$scope.saveApplyInfo = function (form,index) {
$scope.initErrorMsg();
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
$scope.initParam();
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
if (index == 3) {
$scope.getRateConfig();
}
if (index == 4) {
$scope.goToLogin();
}
$scope.changeChoose(index);
}, function (resp) {
$scope.resError = resp.data.message;
});
};
$scope.initParam = function () {
if(!$scope.partner.company_name){
$scope.partner.company_name = ' ';
}
if(!$scope.partner.short_name){
$scope.partner.short_name = ' ';
}
if(!$scope.partner.company_phone){
$scope.partner.company_phone = ' ';
}
if(!$scope.partner.address){
$scope.partner.address = ' ';
}
if(!$scope.partner.suburb){
$scope.partner.suburb = ' ';
}
if(!$scope.partner.state){
$scope.partner.state = ' ';
}
if(!$scope.partner.postcode){
$scope.partner.postcode = ' ';
}
if(!$scope.partner.industry){
$scope.partner.industry = ' ';
}
if(!$scope.partner.bank_no){
$scope.partner.bank_no = ' ';
}
if(!$scope.partner.bank_name){
$scope.partner.bank_name = ' ';
}
if(!$scope.partner.bsb_no){
$scope.partner.bsb_no = ' ';
}
if(!$scope.partner.clean_days){
$scope.partner.clean_days = ' ';
}
if(!$scope.partner.abn){
$scope.partner.abn = ' ';
}
}
$scope.initErrorMsg = function () {
$scope.resError = '';
}
}]);

@ -60,6 +60,13 @@
<span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="!partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="!partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="!partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="!partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
<b ng-if="partner.source!=4">
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
@ -68,6 +75,7 @@
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</b>
</h3>
</div>
<div class="box-body">
@ -114,7 +122,7 @@
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary">BD完善资料</button>
<button type="button" class="btn btn-xs btn-primary">完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_logs">

@ -498,11 +498,10 @@
<td ng-class="{'bg-green':(partner.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.open_status==1||partner.open_status==2||partner.open_status==4) && partner.approve_result!=3)||(partner.approve_result==3 && (!partner.open_status || partner.open_status==1))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}">
<span ng-if="partner.approve_result==1 && partner.approve_time">通过({{partner.approve_time}})</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source!=4">资料完善中</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source==4">(自助开通)资料完善中</span>
<span ng-if="!partner.open_status && partner.approve_result==2 && partner.approve_time">自助开通试用中({{partner.approve_time}}~{{partner.expiry_time}})</span>
<span ng-if="partner.approve_result==0 && partner.approve_time">不通过({{partner.approve_time}})</span>
<span ng-if="partner.approve_result==5 && partner.approve_time && partner.refuse_remark">申请打回({{partner.refuse_remark|limitTo:15}})</span>
<span ng-if="partner.approve_result==5 && partner.approve_time && !partner.refuse_remark">申请打回{{partner.refuse_remark|limitTo:15}}</span>
<span ng-if="!partner.approve_result && !partner.approve_time && partner.source==4">Quick Pass(等待同意协议)</span>
<span ng-if="(partner.open_status==1||partner.open_status==4) && partner.approve_result!=3"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="partner.approve_result==3 && (!partner.open_status || partner.open_status==1)">自助开通(等待合规)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>

@ -0,0 +1,60 @@
package au.com.royalpay.payment.manage.application.core.impls;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
@SpringBootTest
@ActiveProfiles({ "dev", "alipay", "wechat", "jd", "bestpay" })
@RunWith(SpringRunner.class)
public class SimpleClientApplyServiceImplTest {
@Resource
private SimpleClientApplyService simpleClientApplyService;
@Test
public void verifyRegisterSMSCode() {
}
@Test
public void newAccount() {
}
@Test
public void partnerSignIn() {
simpleClientApplyService.partnerSignIn(null);
}
@Test
public void getAndSendSmsCode() {
simpleClientApplyService.getAndSendSmsCode("0451120326","61");
}
@Test
public void sendVerifyEmail() {
simpleClientApplyService.sendVerifyEmail("kira.wang@royalpay.com.au", 9,"kiratest");
}
@Test
public void checkOrGenerateRegisterProcessKey() {
}
@Test
public void deleteRegisterProcessKey() {
}
@Test
public void checkOrGenerateVerifyMailKey() {
}
@Test
public void deleteVerifyMailKey() {
}
}

@ -0,0 +1,42 @@
package au.com.royalpay.payment.manage.kira;
import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
@SpringBootTest
@ActiveProfiles({"dev","alipay","wechat","jd","bestpay"})
@RunWith(SpringRunner.class)
public class WechatMessageTest {
@Resource
private PaymentApi paymentApi;
@Resource
private MpWechatApiProvider mpWechatApiProvider;
@Test
public void asd(){
String openId = "o32MzuO4s8c7iFOVxnxejkbhMoEc";
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(openId);
String templateId = api.getTemplateId("refund-send");
TemplateMessage msg = new TemplateMessage(openId, templateId, "");
msg.put("first", "退款已提交处理", "#10b24c");
msg.put("keyword1", "test1", "#000000");
msg.put("keyword2", "test2", "#000000");
msg.put("keyword3","test3", "#000000");
msg.put("keyword4", "test4", "#000000");
msg.put("remark", "已受理您的退款申请,\n将\n\r在近期到账", "#10b24c");
api.sendTemplateMessage(msg);
}
}
Loading…
Cancel
Save