# Conflicts: # src/main/ui/merchant_application.html # src/main/ui/static/css/merchant_application.css # src/main/ui/static/merchantapplication/merchant_application.jsmaster
commit
02903d5055
@ -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,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);
|
||||
}
|
@ -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
|
@ -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 < #{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,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 = '';
|
||||
}
|
||||
|
||||
}]);
|
@ -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…
Reference in new issue