[fix]新增支付成功页

master
lujian 6 years ago
parent d643f8cea7
commit 5dd947a9db

@ -247,6 +247,8 @@ public interface ClientManager {
void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version);
void changePaymentPage(JSONObject account, String paypad_version);
void changeManualSettle(JSONObject account , int client_id, boolean manual_settle,String operator_id,int type,String operation);

@ -3032,6 +3032,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientModifySupport.processClientConfigModify(new PaypadVersionModify(manager, clientMoniker, paypad_version));
}
@Override
public void changePaymentSuccessPage(JSONObject manager, String clientMoniker, String paysuccess_version) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
client.put("paysuccess_version", paysuccess_version);
clientMapper.update(client);
}
@Override
public void changePaymentPage(JSONObject account, String paypad_version) {
int clientId = account.getIntValue("client_id");

@ -298,6 +298,11 @@ public class PartnerManageController {
clientManager.changePaymentPage(manager, clientMoniker, pass.getString("paypad_version"));
}
@ManagerMapping(value = "/{clientMoniker}/paysuccess_version", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void changePaymentSuccessPage(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.changePaymentSuccessPage(manager, clientMoniker, pass.getString("paysuccess_version"));
}
@ManagerMapping(value = "/{clientMoniker}/trade_logs", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT, ManagerRole.DIRECTOR, ManagerRole.FINANCIAL_STAFF})
public JSONObject listPartnerTradeLogs(@PathVariable String clientMoniker, TradeLogQuery query, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception {
return tradeLogService.listPartnerTradeLogs(manager, null, clientMoniker, query, null);

@ -0,0 +1,153 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="/static/lib/weui/index.css">
<link rel="stylesheet" href="/static/lib/weui/wepayui.min.css">
<meta http-equiv="cache-control" content="max-age=0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
<title data-th-if="${order['status']>=5}">Pay Successful</title>
<title data-th-if="${order['status']==4}">Payment Failed</title>
<title data-th-if="${order['status']==3}">Order Closed</title>
<title data-th-if="${order['status']<=2}">Not Pay</title>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
<script data-th-if="${order['channel']=='Wechat'}" type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script data-th-if="${order['channel']=='Wechat'}" type="text/javascript" src="/static/templates/disable_wechat_menu.js?t=201607070231"></script>
<script data-th-if="${#strings.startsWith(order['channel'],'Alipay')}" src="https://a.alipayobjects.com/g/h5-lib/alipayjsapi/3.0.3/alipayjsapi.min.js"></script>
<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>
<script type="text/javascript" data-th-inline="javascript">
window.order_id = [[${order['order_id']}]];
window.order_gateway = [[${order['gateway']}]];
window.actChairty = [[${act_charity}]];
document.addEventListener('back', function (e) {
e.preventDefault();
if(AlipayJSBridge) {
AlipayJSBridge.call('popWindow');
}else {
window.close();
}
})
</script>
<link rel="stylesheet" type="text/css" href="/static/templates/payment/success.css?t=20170427">
<script type="text/javascript" src="/static/templates/payment/success.js?t=20180104"></script>
</head>
<body>
<div class="pagehead" style="padding: 10px 0" data-th-classappend="${order['channel']}">
<p>
<img data-th-if="${order['status']>=5}" src="https://act.weixin.qq.com/res/img/wepayui/0.0.1/icon_success_green_186x186.png" alt="">
<span data-th-if="${order['status']>=5}" class="pleft"> 支付成功</span>
<span data-th-if="${order['status']>=5}" class="pright" data-th-text="|${order['currency']} ${#numbers.formatDecimal(order['total_amount'],1,2)}|"></span></p>
<span class="pleft" data-th-if="${order['status']==4}"> 支付失败</span>
<span class="pleft" data-th-if="${order['status']==3}"> 已关闭</span>
<span class="pleft" data-th-if="${order['status']<=2}"> 未支付</span>
</div>
<div class="weui-wepay-details">
<div class="weui-wepay-details__bd">
<div class="weui-wepay-detail">
<div class="weui-wepay-detail__bd">商户:</div>
<div class="weui-wepay-detail__ft" data-th-text="${client['short_name']}">${client.short_name}</div>
</div>
<div class="weui-wepay-detail">
<div class="weui-wepay-detail__bd">支付金额:</div>
<div class="weui-wepay-detail__ft" data-th-text="|${order['currency']} ${#numbers.formatDecimal(order['customer_payment_amount'],1,2)}|"></div>
</div>
<div class="weui-wepay-detail" data-th-unless="${order['channel'] == 'Wechat'}">
<div class="weui-wepay-detail__bd">输入金额:</div>
<div class="weui-wepay-detail__ft" data-th-text="|${order['currency']} ${#numbers.formatDecimal(order['display_amount'],1,2)}|"></div>
</div>
<div class="weui-wepay-detail" data-th-if="${order['surcharge_amount']!=null and order['channel'] != 'Wechat'}">
<div class="weui-wepay-detail__bd">手续费:</div>
<div class="weui-wepay-detail__ft" data-th-text="|${order['currency']} ${#numbers.formatDecimal(order['surcharge_amount'],1,2)}|"></div>
</div>
<div class="weui-wepay-detail" data-th-if="${order['channel'] != 'hf'}">
<div class="weui-wepay-detail__bd">汇率:</div>
<div class="weui-wepay-detail__ft" data-th-text="${order['exchange_rate']}">${order.exchange_rate}</div>
</div>
<div class="weui-wepay-detail">
<div class="weui-wepay-detail__bd">时间:</div>
<div class="weui-wepay-detail__ft" data-th-text="${#dates.format(order['transaction_time'],'yyyy-MM-dd HH:mm:ss')}"></div>
</div>
<div class="weui-wepay-detail">
<div class="weui-wepay-detail__bd">单号:</div>
<div class="weui-wepay-detail__ft" data-th-text="${order['order_id']}"></div>
</div>
<div class="weui-wepay-detail" data-th-if="${order['system_transaction_id']}">
<div class="weui-wepay-detail__bd">流水号:</div>
<div class="weui-wepay-detail__ft" data-th-text="${order['system_transaction_id']}"></div>
</div>
<div class="weui-wepay-detail" data-th-if="${order['order_detail']}">
<div class="weui-wepay-detail__bd">备注:</div>
<div class="weui-wepay-detail__ft" data-th-text="${order['order_detail']}"></div>
</div>
</div>
<div class="ad" style="padding: 0 0" data-th-if="${act_charity}">
<a href="/static/activity/loving_merchants/loving_merchants_intro.html">
<img src="/static/images/act/actChairty.jpeg">
</a>
</div>
<div class="afterhr" style="padding: 5px 0;"></div>
<div class="ad" data-th-if="${ad['content']}" data-th-utext="${ad['content']}">
</div>
<div class="weui-wepay-logos weui-wepay-logos_ft" data-th-if="${order['channel']=='Wechat'}">
<i class="weui-wepay-logo-default weui-wepay-logo_gray" style="font-size: 16px;">
<span class="path1"></span><span class="path2"></span>
</i>
</div>
<div class="encourage-dialog hide">
<div class="mask"></div>
<div class="dialog-content">
<div class="close-btn">
<div class="close-circle"></div>
</div>
<div class="encourage-content">
<div class="encourage-title">恭喜您!获得一笔鼓励金</div>
<div class="encourage-desc">活动期间任意消费满10澳币获取随机鼓励金</div>
<div class="coin">
<div class="money-amount">0.00</div>
<div class="double-text">点击翻倍</div>
</div>
<div class="coin-moving left1"></div>
<div class="coin-moving right1"></div>
<div class="coin-moving right2"></div>
<div class="double-rate">X 1</div>
<a class="link" href="/act/encourage_money/my">查看累积金额</a>
</div>
</div>
</div>
<div class="points-dialog hide">
<div class="mask"></div>
<div class="dialog-content">
<div class="close-btn">
<div class="close-circle"></div>
</div>
<div class="points-content">
<div class="points-title">恭喜您!获得积分奖励</div>
<div class="points-desc">使用RoyalPay任意消费满10澳币获取相应积分</div>
<div class="coin">
</div>
<div class="coin-moving left1"></div>
<div class="coin-moving right1"></div>
<div class="coin-moving right2"></div>
<div class="points-value">+20<span>积分</span></div>
<a class="link" href="https://customer.royalpay.com.au">查看累积积分</a>
</div>
</div>
</div>
</div>
</body>
</html>

@ -1805,6 +1805,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
// 更改支付成功页
$scope.changePaySuccessPage = function () {
if (!$scope.paymentInfo) {
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/paysuccess_version', {paysuccess_version: $scope.paymentInfo.paysuccess_version}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'failed to change Payment Success Page Version',
content: resp.data.message,
type: 'error'
})
})
};
$scope.toggleRequireCustInfo = function () {
if (!$scope.paymentInfo) {
return;

@ -466,18 +466,41 @@
<div class="panel panel-default">
<div class="panel-heading">Payment Page</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group" ng-if="'111'|withRole">
<label class="col-sm-2 control-label">Select Version</label>
<div class="col-sm-4">
<div class="form-horizontal" ng-if="'111'|withRole">
<div class="form-group col-sm-6">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changePaymentPage()" ng-model="paymentInfo.paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v1'" src="/static/images/payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2'" src="/static/images/payment_page_v2.jpg">
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v1'" src="/static/images/payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2'" src="/static/images/payment_page_v2.jpg">
<select class="form-control" ng-change="changePaySuccessPage()" ng-model="paymentInfo.paysuccess_version"
title="Payment Success Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.paysuccess_version=='v1'"
src="/static/images/paysuccess_v1.png">
<img style="width: 200px" ng-if="paymentInfo.paysuccess_version=='v2'"
src="/static/images/paysuccess_v2.png">
</div>
</div>
</div>
</div>

Loading…
Cancel
Save