master
wangning 7 years ago
parent 15fe2c59fb
commit fd74bf0e22

@ -17,6 +17,7 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring4.SpringTemplateEngine;
@ -30,6 +31,7 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
@Service
public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Value("${royalpay.sms.appid}")
@ -157,7 +159,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
}
}
String key = RandomStringUtils.random(10, true, false);
stringRedisTemplate.boundValueOps(getRegisterClientProcessRedisKey(key)).set(address,1,TimeUnit.HOURS);
stringRedisTemplate.boundValueOps(getVerifyMailRedisKey(key)).set(address,1,TimeUnit.HOURS);
return key;
}

@ -45,7 +45,7 @@ public class SimpleClientApplyController {
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}/jump", method = RequestMethod.GET)
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String address){
simpleClientApplyService.checkOrGenerateVerifyMailKey(address,codeKey);
ModelAndView view = new ModelAndView("verify_mail");
ModelAndView view = new ModelAndView("mail/register_application");
view.addObject("codeKey", codeKey);
view.addObject("address", address);
return view;
@ -61,4 +61,5 @@ public class SimpleClientApplyController {
signInAccountService.accountCheck(loginInfo);
simpleClientApplyService.deleteVerifyMailKey(codeKey);
}
}

@ -19,17 +19,14 @@
<tr class="header">
<td align="center">
<h1 style="font-size: 24px; line-height: 1.3em; margin-bottom: 5px;">Register Invitation</h1>
<h1 style="font-size: 24px; line-height: 1.3em; margin-bottom: 5px;">Verify mail address</h1>
</td>
</tr>
<tr class="content">
<td>
<p style="font-size: 15px; font-weight: normal; line-height: 22px;">Dear Partner, </p>
<p style="font-size: 15px; font-weight: normal; line-height: 22px;">Thank you for registering an account with us!</p>
<p style="font-size: 15px; font-weight: normal; line-height: 22px;">This is a system verification email from RoyalPay. RoyalPay is an exciting platform that makes international payments as easy as local ones.
To get started, click on the button below:</p>
<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>
@ -39,15 +36,28 @@
<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>Register your account right now!</strong></a>
<!--
<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 email address right now!</strong></a>
-->
</td>
</tr>
</tbody></table>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<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>
Customer Service:
<img src="https://mpay.royalpay.com.au/static/css/img/qr_service.png">
</td>
</tr>
</tbody>
</table>
</td>

@ -4,37 +4,16 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>RoyalPay | Reset Password</title>
<link rel="apple-touch-icon" sizes="57x57" href="ico/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="ico/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="ico/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="ico/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="ico/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="ico/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="ico/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="ico/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="ico/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="ico/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="ico/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="ico/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="ico/favicon-16x16.png">
<!-- 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="static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<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="./static/lib/dist/css/AdminLTE.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[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]-->
<link rel="stylesheet" href="https://mpay.royalpay.com.au/static/lib/dist/css/AdminLTE.min.css">
<style type="text/css">
#bg {
display: block;
@ -65,8 +44,7 @@
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<p><img src="static/images/rp_logo.svg" style="width:45%"></p>
<a href="index.html"><b>RoyalPay</b></a>
<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">
@ -84,19 +62,12 @@
</div>
<div class="row">
<!-- <div class="form-group col-xs-12">
<input type="text" name="codeKey" class="form-control" style="width: 70%;display: inline"
id="codeKey" placeholder="Verification Code">
<img style="width:30%;display:inline;height: 34px;float: right" id="email-kaptcha"
src="/global/userstatus/captcha-login"
title="点击更换"/>
</div>-->
<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 partner code to confirm your identity information, please enter it. (Your partner code is the same as the first four letters of your order ID.)
We need your user name & password to confirm your identity information, please enter it.
</p>
</form>
@ -105,9 +76,9 @@
</div>
<!-- /.login-box -->
<script src="static/lib/jquery/jquery-2.1.4.min.js"></script>
<script src="https://mpay.royalpay.com.au/static/lib/jquery/jquery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="static/lib/bootstrap/js/bootstrap.min.js"></script>
<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}]]*/'';

@ -0,0 +1,58 @@
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() {
}
@Test
public void getAndSendSmsCode() {
}
@Test
public void sendVerifyEmail() {
simpleClientApplyService.sendVerifyEmail("kira.wang@royalpay.com.au",9);
}
@Test
public void checkOrGenerateRegisterProcessKey() {
}
@Test
public void deleteRegisterProcessKey() {
}
@Test
public void checkOrGenerateVerifyMailKey() {
}
@Test
public void deleteVerifyMailKey() {
}
}
Loading…
Cancel
Save