wangning 7 years ago
commit 4dd5684974

@ -18,6 +18,7 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.RequestEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.utils.PasswordUtils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
@ -138,7 +139,7 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
validLoginInfo(loginInfo, account);
JSONObject client = clientManager.getClientInfoIgnoreInvalid(account.getIntValue("client_id"));
if (client != null && !client.getBooleanValue("is_valid")) {
throw new BadRequestException("用户名或密码不正确");
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
validLoginInfo(loginInfo, account);
publisher.publishEvent(new ManagerLoginEvent(this, account.getString("manager_id"), RequestEnvironment.getClientIp(), "PASSWORD"));
@ -147,12 +148,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
private void validLoginInfo(LoginInfo loginInfo, JSONObject account) {
if (account == null) {
throw new BadRequestException("用户名或密码不正确");
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
}
String salt = account.getString("salt");
String pwdHash = loginInfo.getPasswordHashed(salt);
if (!StringUtils.equals(pwdHash, account.getString("password_hash"))) {
throw new BadRequestException("用户名或密码不正确");
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
}
}

@ -52,7 +52,7 @@ error.permission.not_login=Please sign in first
error.permission.login_again=Your login has expired. Please sign in again.
error.permission.nopermission=You have no permission to access this resource.
error.permission.not_manager_login=Use manager account and sign in.
s
error.settlement.season_invalid=Season of next rate cycle not started. Unable to generate new rate automatically
error.partner.valid.dumplicate_client_moniker=Partner code exists
@ -76,6 +76,9 @@ error.register.valid.dumplicate_email=The email address has been registered,plea
error.payment.xplan.enable=Activity not started yet. Keep attention about us.
error.payment.xplan.not-auto-join=Self-join not allowed yet. Contact our service please.
error.login.password=User name or password error.
todo.settlement.date_setting=Settle Dates configured are running out. Config new Settle Dates
todo.rate.expire_warning=Some clients' rate are expiring soon or expired. Please fix it as soon as possible.
todo.client.approve=Some clients are waiting for compliance.
@ -95,4 +98,6 @@ app.label.pay=Pay
app.label.remark=Remark
app.label.creating-order=...
app.label.close=Close
app.label.coupons=Available Coupons
app.label.coupons=Available Coupons

@ -73,6 +73,7 @@ error.payment.customer_cheat=交易次数过频,请明日再试
error.payment.xplan.enable=活动暂未开通,敬请期待
error.payment.xplan.not-auto-join=暂不允许自主申请,详请联系我们客服
error.login.password=用户名或密码错误
todo.settlement.date_setting=已配置清算日即将到期,请配置新的清算日
todo.rate.expire_warning=有商户费率即将到期或已过期,请尽快处理

@ -6,6 +6,9 @@ $(document).ready(function () {
decode();
function decode() {
if (window.client_moniker == 'PINE') {
alert('debug:origin redirect:' + window.redirect);
}
var redirect = window.redirect;
while (redirect.indexOf('://') < 0) {
redirect = decodeURIComponent(redirect);
@ -68,6 +71,9 @@ $(document).ready(function () {
function callPayment(tradeNo) {
try {
if (window.client_moniker == 'PINE') {
alert('debug:trade no=' + tradeNo)
}
AlipayJSBridge.call('tradePay', {
tradeNO: tradeNo
}, function (res) {
@ -84,7 +90,7 @@ $(document).ready(function () {
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=true';
} else {
alert(res.memo);
if(window.tradeNo){
if (window.tradeNo) {
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=false';
}
}

Loading…
Cancel
Save