master
dulingling 4 years ago
commit 199b165344

@ -305,7 +305,7 @@ public class MailServiceImp implements MailService {
} }
@Override @Override
public String sendRiskEmail(String title, String mailTos, String mailCcs,String mailBcc, String content, List<JSONObject> attachFiles, int order_type) throws URISyntaxException, IOException { public String sendRiskEmail(String title, String mailTos, String mailCcs, String mailBcc, String content, List<JSONObject> attachFiles, int orderType) throws IOException {
NoticeBean noticeBean = new NoticeBean(); NoticeBean noticeBean = new NoticeBean();
noticeBean.setTitle(title); noticeBean.setTitle(title);
List<JSONObject> mailClients = new ArrayList<>(); List<JSONObject> mailClients = new ArrayList<>();
@ -324,7 +324,7 @@ public class MailServiceImp implements MailService {
Key riskControlAesKey = AESCrypt.fromKeyString(Base64.decodeBase64(riskControlAESKey)); Key riskControlAesKey = AESCrypt.fromKeyString(Base64.decodeBase64(riskControlAESKey));
String riskControlMailPwd = new String(AESCrypt.decrypt(Base64.decodeBase64(riskControlMailPwdEncrypted), riskControlAesKey), StandardCharsets.UTF_8); String riskControlMailPwd = new String(AESCrypt.decrypt(Base64.decodeBase64(riskControlMailPwdEncrypted), riskControlAesKey), StandardCharsets.UTF_8);
noticeBean.setPassword(riskControlMailPwd); noticeBean.setPassword(riskControlMailPwd);
if(order_type == 1 || order_type == 2){ if (orderType == 1 || orderType == 2) {
String riskMailPwdEncrypted = sysConfig.getString("risk.email.password"); String riskMailPwdEncrypted = sysConfig.getString("risk.email.password");
Assert.isTrue(StringUtils.isNotEmpty(riskMailPwdEncrypted), "risk mail pwd not configured"); Assert.isTrue(StringUtils.isNotEmpty(riskMailPwdEncrypted), "risk mail pwd not configured");
Key riskAesKey = AESCrypt.fromKeyString(Base64.decodeBase64(riskAESKey)); Key riskAesKey = AESCrypt.fromKeyString(Base64.decodeBase64(riskAESKey));
@ -334,12 +334,10 @@ public class MailServiceImp implements MailService {
} }
String postUrl = mailHost + "/mail/single?" + generateMailSignParam(); String postUrl = mailHost + "/mail/single?" + generateMailSignParam();
HttpRequestResult result = null; HttpRequestResult result = null;
logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); logger.info("===sendEmail===noticeBean:{}", JSON.toJSON(noticeBean));
result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute();
if (result.isSuccess()) { if (result.isSuccess()) {
String mail_id = result.getResponseContentJSONObj().getString("mail_id"); return result.getResponseContentJSONObj().getString("mail_id");
return mail_id;
//System.out.println("send Mail=============="+mail_id);
} else { } else {
throw new ServerErrorException("Error Connection"); throw new ServerErrorException("Error Connection");
} }

@ -5,6 +5,7 @@ import au.com.royalpay.payment.core.beans.ChargebackStatus;
import au.com.royalpay.payment.core.exceptions.EmailException; import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.OrderNotMatchException; import au.com.royalpay.payment.core.exceptions.OrderNotMatchException;
import au.com.royalpay.payment.core.utils.ExtParamsUtils;
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper; import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
@ -392,7 +393,19 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
if (evt == null) { if (evt == null) {
return; return;
} }
JSONObject order = orderMapper.find(evt.getOrders().get(0).getRealOrderId());
if (order == null) {
throw new BadRequestException("Order Not found");
}
if (ExtParamsUtils.getExtParamsBooleanValue(order, "chargeback_mark")) {
throw new BadRequestException("Duplicated chargeback on same order");
}
cardSecureService.submitChargeBackReport(evt); cardSecureService.submitChargeBackReport(evt);
JSONObject update = new JSONObject();
update.put("order_id", order.getString("order_id"));
update.put(ExtParamsUtils.EXT_PARAMS, order.getString(ExtParamsUtils.EXT_PARAMS));
ExtParamsUtils.putExtParam(update, "chargeback_mark", true);
orderMapper.update(update);
} }
} }
@ -626,6 +639,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
sendAppRiskMessage(event); sendAppRiskMessage(event);
} }
} catch (Exception e) { } catch (Exception e) {
logger.error("Risk Email sending failed", e);
throw new EmailException("Email Sending Failed", e); throw new EmailException("Email Sending Failed", e);
} }
}); });
@ -784,7 +798,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
}); });
} }
private Context getMailContext(JSONObject event) throws IOException { private Context getMailContext(JSONObject event) {
String clientMoniker = event.getString("client_moniker"); String clientMoniker = event.getString("client_moniker");
JSONObject client = clientMapper.findClientByMonikerAll(clientMoniker); JSONObject client = clientMapper.findClientByMonikerAll(clientMoniker);
if (client == null) { if (client == null) {
@ -893,8 +907,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
switch (event.getIntValue("order_type")) { switch (event.getIntValue("order_type")) {
case 1: case RISK_ORDER_TYPE_WX:
case 2: case RISK_ORDER_TYPE_ALIPAY:
for (String orderId : realOrderIds) { for (String orderId : realOrderIds) {
JSONObject order = orderMapper.findOrderById(orderId, client.getIntValue("client_id")); JSONObject order = orderMapper.findOrderById(orderId, client.getIntValue("client_id"));
if (order == null) { if (order == null) {
@ -905,7 +919,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
ctx.setVariable("orders", orders); ctx.setVariable("orders", orders);
ctx.setVariable("title", "Your merchants needs to submit risk materials"); ctx.setVariable("title", "Your merchants needs to submit risk materials");
break; break;
case 3: case RISK_ORDER_TYPE_RP:
for (String orderId : realOrderIds) { for (String orderId : realOrderIds) {
JSONObject order = tradeLogService.getOrderDetail(new JSONObject(), clientMoniker, orderId, null); JSONObject order = tradeLogService.getOrderDetail(new JSONObject(), clientMoniker, orderId, null);
if (order == null) { if (order == null) {
@ -922,9 +936,21 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
orders.add(order); orders.add(order);
} }
ctx.setVariable("orders", orders); ctx.setVariable("orders", orders);
case 4: case RISK_ORDER_TYPE_WARN:
ctx.setVariable("title", "RoyalPay风控调查 — " + client.getString("short_name")); ctx.setVariable("title", "RoyalPay风控调查 — " + client.getString("short_name"));
break; break;
case RISK_ORDER_TYPE_CHARGEBACK:
for (String orderId : realOrderIds) {
JSONObject order = orderMapper.findOrderById(orderId, client.getIntValue("client_id"));
if (order == null) {
throw new BadRequestException("Order: " + orderId + " not exists");
}
order.put(ExtParamsUtils.EXT_PARAMS, ExtParamsUtils.getExtParams(order));
orders.add(order);
}
ctx.setVariable("title", "Chargeback Notification from UPay");
ctx.setVariable("orders", orders);
break;
} }
return ctx; return ctx;
} }
@ -1377,6 +1403,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
} }
@Override @Override
@Transactional
public void markChargebackStatus(String riskId, JSONObject manager, ChargebackStatus status) { public void markChargebackStatus(String riskId, JSONObject manager, ChargebackStatus status) {
RiskEvent risk = getRiskEvent(riskId); RiskEvent risk = getRiskEvent(riskId);
if (risk == null) { if (risk == null) {
@ -1388,6 +1415,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
if (status == null || status == ChargebackStatus.PROCESSING) { if (status == null || status == ChargebackStatus.PROCESSING) {
throw new BadRequestException("Invalid status"); throw new BadRequestException("Invalid status");
} }
if (risk.getResultType() < 5) {
riskProcessLogService.addRiskProcessLog(riskId, riskProcessLogService.addRiskProcessLog(riskId,
manager.getString("manager_id"), manager.getString("manager_id"),
manager.getString("display_name"), manager.getString("display_name"),
@ -1395,6 +1423,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
RiskResultTypeEnum.ALREADY_HANDLED.getResultType(), RiskResultTypeEnum.ALREADY_HANDLED.getResultType(),
RiskResultTypeEnum.ALREADY_HANDLED.getResultType()); RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
cardSecureService.changeChargebackReportStatus(riskId, status); cardSecureService.changeChargebackReportStatus(riskId, status);
JSONObject evt = new JSONObject();
evt.put("risk_id", risk.getRiskId());
evt.put("result_type", RiskResultTypeEnum.ALREADY_HANDLED.getResultType());
riskEventMapper.update(evt);
}
} }
private List<String> getShopTemplate() { private List<String> getShopTemplate() {

@ -991,6 +991,7 @@
o.channel, o.channel,
o.create_time, o.create_time,
o.confirm_time pay_time, o.confirm_time pay_time,
o.ext_params,
format(o.total_amount,2) total_amount, format(o.total_amount,2) total_amount,
format(o.display_amount,2) display_amount, format(o.display_amount,2) display_amount,
format(o.refund_amount,2) refund_amount, format(o.refund_amount,2) refund_amount,

@ -145,6 +145,76 @@
<p>我司风控系统检测到您短期内后台交易存在异常行为(<span th:if="${warning_order_type==0}" style="background: #FCE824">单人多次大金额交易</span><span th:if="${warning_order_type==1}" style="background: #FCE824">退款频繁</span>),触发平台风控预警,特此提醒:请勿使用平台进行违规交易,一经核查将关闭支付权限。请知悉。<br> <p>我司风控系统检测到您短期内后台交易存在异常行为(<span th:if="${warning_order_type==0}" style="background: #FCE824">单人多次大金额交易</span><span th:if="${warning_order_type==1}" style="background: #FCE824">退款频繁</span>),触发平台风控预警,特此提醒:请勿使用平台进行违规交易,一经核查将关闭支付权限。请知悉。<br>
RoyalPay's risk management system has identified abnormal transactions from your records in a short time(<span th:if="${warning_order_type==0}" style="background: #FCE824">Single person pays large sums several times</span><span th:if="${warning_order_type==1}" style="background: #FCE824">frequent refund transactions</span>),which triggered the platform risk control warning. Here reminds: Do not use the platform for illegal transactions. Once verified, the payment authority will be closed. </p> RoyalPay's risk management system has identified abnormal transactions from your records in a short time(<span th:if="${warning_order_type==0}" style="background: #FCE824">Single person pays large sums several times</span><span th:if="${warning_order_type==1}" style="background: #FCE824">frequent refund transactions</span>),which triggered the platform risk control warning. Here reminds: Do not use the platform for illegal transactions. Once verified, the payment authority will be closed. </p>
</div> </div>
<div th:if="${order_type==6}">
<b>Dear <span th:text="${bdNamesStr}" th:if="${is_send_client==0}"></span><span th:text="${client.contact_person}"
th:if="${is_send_client==1}"></span>:</b>
<p>
<span th:text="${hello}"></span><span th:text="${bdNamesStr}" th:if="${is_send_client==0}"></span><span
th:text="${client.contact_person}" th:if="${is_send_client==1}"></span>
由于消费者申请Chargeback请于
<span th:text="${reply_date}" style="background: #FCE824;"></span>
<span style="background: #FCE824;">下午5:00悉尼时间</span>
尽可能提供以下证明材料:
</p>
<p>
Due to customer applied chargeback issue. Please provide as much materials as best for the transaction
before <span style="background: #FCE824;" th:text="${reply_date_english}"></span>(Sydney time).
</p>
<p>1、持卡人签名授权书和/或收据的清晰副本</p>
<p>1. A legible copy of the signed authority and/or receipts from the Cardholder.</p>
<p>2、任何税务发票和/或签署的披露取消政策的副本</p>
<p>2. Copy of any tax invoice/s and/or signed disclosure of cancellation policy.</p>
<p>3、与在线购买的任何数字商品的销售有关的任何交易信息</p>
<p>3. Any transaction Information relating to the sale of any digital goods purchased online.</p>
<p>4、提供的商品/服务的说明和/或交付/收货的证明。(消费者买了什么,商家卖了什么,消费者收没收到货,如何收到的)</p>
<p>4. Description of the goods/services supplied and/or proof of delivery/collection of goods.</p>
<p>5、邮件订单/电话订单交易收据的副本</p>
<p>5. Copy of Mail Order/telephone order transaction receipt.</p>
<p>6、持卡人身份或与持卡人的任何形式的通信包括电子邮件通信。</p>
<p>6. Cardholder identification or any form of communication with the Cardholder, including email
correspondence.</p>
<table style="border: 1.0px solid;border-collapse: collapse;">
<thead>
<tr>
<th style="border: 1.0px solid;border-collapse: collapse;">Order ID</th>
<th style="border: 1.0px solid;border-collapse: collapse;">Amount</th>
<th style="border: 1.0px solid;border-collapse: collapse;">Status</th>
<th style="border: 1.0px solid;border-collapse: collapse;">Create Time</th>
<th style="border: 1.0px solid;border-collapse: collapse;">Card Number</th>
</tr>
</thead>
<tbody>
<tr th:each="order : ${orders}">
<td th:text="${order.order_id}" style="border: 1.0px solid;border-collapse: collapse;"></td>
<td th:text="AUD+${order.clearing_amount}" style="border: 1.0px solid;border-collapse: collapse;"></td>
<td th:text="${order.status}" style="border: 1.0px solid;border-collapse: collapse;"></td>
<td th:text="${order.create_time}" style="border: 1.0px solid;border-collapse: collapse;"></td>
<td th:text="${order.ext_params.card_alias}" style="border: 1.0px solid;border-collapse: collapse;"></td>
</tr>
</tbody>
</table>
<p th:if="${description != null}"><span th:text="${description}"></span></p>
<p><strong>Chargeback将会扣除$40作为Chargeback Fee同时扣除对应订单交易额申诉成功后将返还订单交易额还请及时提交材料。</strong><!--还请按时提供商户材料并直接回复该邮件, -->
感谢,辛苦。</p>
<!--<p>请点击此链接上传所需材料<a th:href="${uploadUrl}"><span th:text="${uploadUrl}"></span></a></p>-->
<p th:if="${is_send_client==1}">材料请通过APP在规定时间内进行上传或请联系BD由BD在后台进行上传。</p>
<p>
<strong>Chargeback issue will take $40 for chargeback fee and minus the fee of the transaction. If you win the
chargeback. Transaction amount will be returned to your account. Please be sure to assist the
investigation.</strong>
Thanks.
</p>
<p th:if="${is_send_client==1}">
The materials can be uploaded by RoyalPay APP within the required time, or contact with BD.
</p>
<p th:if="${is_send_client==0}"><a th:href="${uploadUrl}"
style="color: rgb(255, 255, 255); text-align: center; padding: 12px 10px; 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: #00c0ef; min-width: 150px;"><strong>Submit
Risk Materials</strong></a></p>
</div>
<br> <br>
<a href="https://royalpay-1256684202.cos.ap-chengdu.myqcloud.com/%E9%A3%8E%E6%8E%A7%E6%8C%87%E5%BC%95-%E5%95%86%E6%88%B7.pdf"> <a href="https://royalpay-1256684202.cos.ap-chengdu.myqcloud.com/%E9%A3%8E%E6%8E%A7%E6%8C%87%E5%BC%95-%E5%95%86%E6%88%B7.pdf">
<p>了解更多关于我司风控事宜。Click into the link to see more about our risk management work.</p></a> <p>了解更多关于我司风控事宜。Click into the link to see more about our risk management work.</p></a>

@ -5,40 +5,79 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
function (angular, $) { function (angular, $) {
'use strict'; 'use strict';
let mailTemplate = { const mailTemplate = {
"1": "代购、综合商城类", "1": "代购、综合商城类",
"2": "飞机票、旅行社类", "2": "飞机票、旅行社类",
"3": "教育类、中介类", "3": "教育类、中介类",
"4": "Chargeback" "4": "Chargeback"
}; };
const orderTypesProfiles = {
let orderTypesMap = { "1": {
"1": "微信调单", label: "微信调单",
"2": "支付宝调单", platform_trans_textarea: true,
"3": "RoyalPay调单", company_name_required: true,
"4": "警告", sub_mch_id_required: true,
"5": "通用号调单", partner_code_required: true,
"6": "卡支付ChargeBack" date_label: 'Receive Date',
can_send_to_mch: true
},
"2": {
label: "支付宝调单",
platform_trans_textarea: true,
partner_code_required: true,
date_label: 'Receive Date',
require_material: true,
can_send_to_mch: true
},
"3": {
label: "RoyalPay调单",
platform_trans_textarea: true,
send_clean_days: true,
rp_order_type: true,
partner_code_required: true,
date_label: 'Create Date',
can_send_to_mch: true
},
"4": {
label: "警告",
warning_type_required: true,
partner_code_required: true,
date_label: 'Create Date',
can_send_to_mch: true
},
"5": {
label: "通用号调单",
platform_trans_textarea: true,
sub_mch_id_required: true,
date_label: 'Create Date'
},
"6": {
label: "卡支付ChargeBack",
single_channel_order: true,
date_label: 'Receive Date',
can_send_to_mch: true,
require_result: true
}
}; };
let orderTypesMapForBD = { const orderTypesMapForBD = {
"1": "微信调单", "1": "微信调单",
"2": "支付宝调单", "2": "支付宝调单",
"3": "RoyalPay调单" "3": "RoyalPay调单"
}; };
let royalpayOrderTypesMap = { const royalpayOrderTypesMap = {
"0": "正常调单", "0": "正常调单",
"1": "单纯大金额频繁刷单" "1": "单纯大金额频繁刷单"
}; };
let warningOrderTypesMap = { const warningOrderTypesMap = {
"0": "单人多次大金额交易", "0": "单人多次大金额交易",
"1": "退款频繁" "1": "退款频繁"
}; };
let resultTypesMap = { const resultTypesMap = {
"0": "未处理", "0": "未处理",
"1": "已发送邮件", "1": "已发送邮件",
"2": "已提交材料,等待审核", "2": "已提交材料,等待审核",
@ -47,7 +86,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"5": "已处理" "5": "已处理"
}; };
let resultTypeSearchMap = { const resultTypeSearchMap = {
"0": "未处理", "0": "未处理",
"1": "资料完善中", "1": "资料完善中",
"2": "等待风控", "2": "等待风控",
@ -56,7 +95,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"5": "已处理" "5": "已处理"
}; };
let resultTypeSearchMapForBD = { const resultTypeSearchMapForBD = {
"1": "材料待上传", "1": "材料待上传",
"2": "材料已提交", "2": "材料已提交",
"3": "风控初审完成,渠道方审核中", "3": "风控初审完成,渠道方审核中",
@ -64,14 +103,14 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"5": "已处理" "5": "已处理"
}; };
let emailStatusMap = { const emailStatusMap = {
"0": "未发送", "0": "未发送",
"1": "已发送", "1": "已发送",
"2": "打回并已发送", "2": "打回并已发送",
"3": "已发送催促邮件" "3": "已发送催促邮件"
}; };
let amountSectionMap = { const amountSectionMap = {
"0-500": "0-500", "0-500": "0-500",
"500-1000": "500-1000", "500-1000": "500-1000",
"1000-1500": "1000-1500", "1000-1500": "1000-1500",
@ -83,7 +122,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
"4000-4500": "4000-4500" "4000-4500": "4000-4500"
}; };
let channelResultArray = [ const channelResultArray = [
"关闭支付", "关闭支付",
"恢复支付", "恢复支付",
"单日10", "单日10",
@ -141,7 +180,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap', 'chartParser', app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap', 'chartParser',
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap, chartParser) { function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap, chartParser) {
$scope.orderTypes = orderTypesMap; $scope.orderTypes = orderTypesProfiles;
$scope.orderTypesForBD = orderTypesMapForBD; $scope.orderTypesForBD = orderTypesMapForBD;
$scope.resultTypes = resultTypesMap; $scope.resultTypes = resultTypesMap;
$scope.resultSearchTypes = resultTypeSearchMap; $scope.resultSearchTypes = resultTypeSearchMap;
@ -284,7 +323,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.ctrl = { $scope.ctrl = {
editRemark: false editRemark: false
}; };
$scope.orderTypes = orderTypesMap; $scope.orderTypes = orderTypesProfiles;
$scope.mailTemplate = mailTemplate; $scope.mailTemplate = mailTemplate;
$scope.resultTypes = resultTypesMap; $scope.resultTypes = resultTypesMap;
$scope.channelResults = channelResultArray; $scope.channelResults = channelResultArray;
@ -376,7 +415,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.commitChargebackStatus = function (std) { $scope.commitChargebackStatus = function (std) {
commonDialog.confirm({title: '确认操作', content: '当前操作不可逆,并会将风控项标记为办结状态,确认操作?'}).then(function () { commonDialog.confirm({title: '确认操作', content: '当前操作不可逆,并会将风控项标记为办结状态,确认操作?'}).then(function () {
$http.put('/risk/business/chargebacks/' + $scope.riskEvent.risk_id + '/status', {status: std}).then(function () { $http.put('/risk/business/chargebacks/' + $scope.riskEvent.risk_id + '/mark_status', {status: std}).then(function () {
$state.reload(); $state.reload();
commonDialog.alert({title: 'Success', content: '修改成功', type: success}) commonDialog.alert({title: 'Success', content: '修改成功', type: success})
}, function (res) { }, function (res) {
@ -742,7 +781,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
function ($scope, $state, $http, $uibModal, $filter, commonDialog) { function ($scope, $state, $http, $uibModal, $filter, commonDialog) {
$scope.receive_email_date = new Date(); $scope.receive_email_date = new Date();
$scope.today = new Date(); $scope.today = new Date();
$scope.orderTypes = orderTypesMap; $scope.orderTypes = orderTypesProfiles;
$scope.mailTemplate = mailTemplate; $scope.mailTemplate = mailTemplate;
$scope.royapayOrderTypes = royalpayOrderTypesMap; $scope.royapayOrderTypes = royalpayOrderTypesMap;
$scope.warningOrderTypes = warningOrderTypesMap; $scope.warningOrderTypes = warningOrderTypesMap;
@ -908,7 +947,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
// 调单类型过滤器 // 调单类型过滤器
app.filter('orderType', function () { app.filter('orderType', function () {
return function (type) { return function (type) {
return orderTypesMap[type]; let profile = orderTypesProfiles[type];
return profile == null ? null : profile.label;
} }
}); });

@ -21,7 +21,7 @@
ng-model="riskEvent.order_type" ng-model="riskEvent.order_type"
id="order-type-input" id="order-type-input"
required required
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value.label for (key, value) in orderTypes">
<option value="">Please Choose</option> <option value="">Please Choose</option>
</select> </select>
<div ng-messages="riskEventForm.order_type.$error" <div ng-messages="riskEventForm.order_type.$error"
@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type == 3" ng-if="orderTypes[riskEvent.order_type].rp_order_type"
ng-class="{'has-error':riskEventForm.royalpay_order_type.$invalid && riskEventForm.royalpay_order_type.$dirty}"> ng-class="{'has-error':riskEventForm.royalpay_order_type.$invalid && riskEventForm.royalpay_order_type.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="royalpay-order-type-input">Royalpay Order Type for="royalpay-order-type-input">Royalpay Order Type
@ -56,7 +56,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type ==3 && riskEvent.royalpay_order_type==1"> ng-if="orderTypes[riskEvent.order_type].send_clean_days && riskEvent.royalpay_order_type==1">
<label class="control-label col-sm-2">是否发送清算周期变更</label> <label class="control-label col-sm-2">是否发送清算周期变更</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" <input type="checkbox"
@ -66,7 +66,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type == 4" ng-if="orderTypes[riskEvent.order_type].warning_type_required"
ng-class="{'has-error':riskEventForm.warning_order_type.$invalid && riskEventForm.warning_order_type.$dirty}"> ng-class="{'has-error':riskEventForm.warning_order_type.$invalid && riskEventForm.warning_order_type.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="warning-order-type-input">Warning Type for="warning-order-type-input">Warning Type
@ -90,7 +90,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type == 5 || riskEvent.order_type == 1" ng-if="orderTypes[riskEvent.order_type].sub_mch_id_required"
ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}"> ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="sub-merchant-id-input">Sub Merchant ID</label> for="sub-merchant-id-input">Sub Merchant ID</label>
@ -112,7 +112,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="(partners != null) && (partners.length > 0) && riskEvent.order_type == 1"> ng-if="(partners != null) && (partners.length > 0) && orderTypes[riskEvent.order_type].company_name_required">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-type-input">Company Name for="order-type-input">Company Name
</label> </label>
@ -135,7 +135,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type != 5 && riskEvent.order_type!=6" ng-if="orderTypes[riskEvent.order_type].partner_code_required"
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}"> ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="short-id-input">Partner Code for="short-id-input">Partner Code
@ -166,7 +166,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type != 4 && riskEvent.order_type!=6" ng-if="orderTypes[riskEvent.order_type].platform_trans_textarea"
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}"> ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-ids-input">Platform Transaction IDs</label> for="order-ids-input">Platform Transaction IDs</label>
@ -188,7 +188,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type==6" <div class="form-group" ng-if="orderTypes[riskEvent.order_type].single_channel_order"
ng-class="{'has-error':riskEventForm.channel_order_id.$invalid && riskEventForm.channel_order_id.$dirty}"> ng-class="{'has-error':riskEventForm.channel_order_id.$invalid && riskEventForm.channel_order_id.$dirty}">
<label class="control-label col-sm-2" for="channel-order-id-input">Channel Transaction <label class="control-label col-sm-2" for="channel-order-id-input">Channel Transaction
ID</label> ID</label>
@ -205,7 +205,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type == 6 && riskEvent.order_ids"> ng-if="orderTypes[riskEvent.order_type].single_channel_order && riskEvent.order_ids">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-ids-input">Platform Transaction ID</label> for="order-ids-input">Platform Transaction ID</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -213,14 +213,15 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEvent.order_type == 6 && riskEvent.client_moniker"> ng-if="orderTypes[riskEvent.order_type].single_channel_order && riskEvent.client_moniker">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-ids-input">Client</label> for="order-ids-input">Client</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="form-control-static" ng-bind="riskEvent.client_moniker"></div> <div class="form-control-static" ng-bind="riskEvent.client_moniker"></div>
</div> </div>
</div> </div>
<div class="row" ng-if="riskEvent.order_type==6 && channel_orders && !riskEvent.order_ids"> <div class="row"
ng-if="orderTypes[riskEvent.order_type].single_channel_order && channel_orders && !riskEvent.order_ids">
<div class="col-sm-12 table-responsive"> <div class="col-sm-12 table-responsive">
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<thead> <thead>
@ -256,7 +257,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="receive-date-input"> for="receive-date-input">
{{(riskEvent.order_type == 1 || riskEvent.order_type == 2) ? 'Receive Date' : 'Create Date'}} {{orderTypes[riskEvent.order_type].date_label}}
</label> </label>
<div class="col-xs-2"> <div class="col-xs-2">
<input class="form-control" <input class="form-control"
@ -265,7 +266,7 @@
ng-model="receive_email_date" ng-model="receive_email_date"
uib-datepicker-popup uib-datepicker-popup
size="10" size="10"
placeholder="{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}" placeholder="{{orderTypes[riskEvent.order_type].date_label}}"
datepicker-options="{maxDate:today}" datepicker-options="{maxDate:today}"
is-open="ReceiveDate.open" is-open="ReceiveDate.open"
ng-click="ReceiveDate.open=true"> ng-click="ReceiveDate.open=true">
@ -286,7 +287,7 @@
</div> </div>
<div class="form-group" ng-repeat="material in materials" <div class="form-group" ng-repeat="material in materials"
ng-if="riskEvent.order_type == 2"> ng-if="orderTypes[riskEvent.order_type].require_material">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="material{{$index+1}}">Material{{$index + 1}} for="material{{$index+1}}">Material{{$index + 1}}
@ -333,7 +334,7 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type != 5"> <div class="form-group" ng-if="orderTypes[riskEvent.order_type].can_send_to_mch">
<label class="control-label col-sm-2">是否发送商户</label> <label class="control-label col-sm-2">是否发送商户</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" <input type="checkbox"

@ -71,7 +71,8 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type == 1 || riskEvent.order_type == 5"> <div class="form-group"
ng-if="orderTypes[riskEvent.order_type].sub_mch_id_required">
<label class="control-label col-sm-2">Sub Merchant ID</label> <label class="control-label col-sm-2">Sub Merchant ID</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static"> <p class="form-control-static">
@ -98,7 +99,8 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type == 3"> <div class="form-group"
ng-if="orderTypes[riskEvent.order_type].rp_order_type">
<label class="control-label col-sm-2">Royalpay Order Type</label> <label class="control-label col-sm-2">Royalpay Order Type</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" <p class="form-control-static"
@ -107,7 +109,8 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type == 4"> <div class="form-group"
ng-if="orderTypes[riskEvent.order_type].warning_type_required">
<label class="control-label col-sm-2">Waning Order Type</label> <label class="control-label col-sm-2">Waning Order Type</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" <p class="form-control-static"
@ -135,7 +138,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2"> <label class="control-label col-sm-2">
{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}} {{orderTypes[riskEvent.order_type].date_label}}
</label> </label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static"> <p class="form-control-static">
@ -181,7 +184,8 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type ==3 && riskEvent.royalpay_order_type==1"> <div class="form-group"
ng-if="orderTypes[riskEvent.order_type].send_clean_days && riskEvent.royalpay_order_type==1">
<label class="control-label col-sm-2">是否发送清算周期变更</label> <label class="control-label col-sm-2">是否发送清算周期变更</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" <input type="checkbox"
@ -231,51 +235,47 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="riskEvent.result_type > 2"> <div class="form-group"
ng-if="riskEvent.result_type > 2 && ('10000000000'|withRole)">
<label class="control-label col-sm-2">Handle Result</label> <label class="control-label col-sm-2">Handle Result</label>
<div class="col-xs-2" ng-if="riskEvent.temporary_close_channel != 1 && enableChannel == 1"> <div class="col-xs-10">
<div class="btn-group">
<button class="btn btn-info" <button class="btn btn-info"
type="button" type="button"
ng-click="updateChannel(riskEvent.order_type, false, false)" ng-if="riskEvent.temporary_close_channel != 1 && enableChannel == 1"
ng-if="'10000000000'|withRole">关停渠道 ng-click="updateChannel(riskEvent.order_type, false, false)">
关停渠道
</button> </button>
</div>
<div class="col-xs-2" ng-if="riskEvent.temporary_close_merchant != 1 && clientInfo.is_valid == 1">
<button class="btn btn-info" <button class="btn btn-info"
type="button" type="button"
ng-click="updateClient(true, false)" ng-click="updateClient(true, false)"
ng-if="'10000000000'|withRole">关停商户 ng-if="riskEvent.temporary_close_merchant != 1 && clientInfo.is_valid == 1">
关停商户
</button> </button>
</div>
<div class="col-xs-2" ng-if="'10000000000'|withRole">
<button class="btn btn-info" <button class="btn btn-info"
ng-if="enableChannel == 0" ng-if="enableChannel == 0"
type="button" type="button"
ng-click="updateChannel(riskEvent.order_type, true, false)"> ng-click="updateChannel(riskEvent.order_type, true, false)">
重新启用渠道 重新启用渠道
</button> </button>
</div>
<div class="col-xs-2" ng-if="clientInfo.is_valid == 0">
<button class="btn btn-info" <button class="btn btn-info"
type="button" type="button"
ng-click="updateClient(false, false)" ng-click="updateClient(false, false)"
ng-if="'10000000000'|withRole">重新启用商户 ng-if="clientInfo.is_valid == 0">重新启用商户
</button> </button>
</div> <button class="btn btn-danger" type="button"
<div class="col-xs-2" ng-if="orderTypes[riskEvent.order_type].require_result && riskEvent.result_type<5"
ng-if="riskEvent.order_type==6 && ('10000000000'|withRole)"> ng-click="commitChargebackStatus('ACCEPTED')">
<button class="btn btn-info" type="button" 放弃申诉
ng-click="commitChargebackStatus('ACCEPTED')">放弃申诉
</button> </button>
</div> <button class="btn btn-success" type="button"
<div class="col-xs-2" ng-if="orderTypes[riskEvent.order_type].require_result && riskEvent.result_type<5"
ng-if="riskEvent.order_type==6 && ('10000000000'|withRole)"> ng-click="commitChargebackStatus('REJECTED')">
<button class="btn btn-info" type="button" 申诉成功
ng-click="commitChargebackStatus('DECLINED')">申诉成功
</button> </button>
</div> </div>
</div> </div>
</div>
<div class="form-group" ng-if="riskEvent.channel_result != null && ('10000000000'|withRole)"> <div class="form-group" ng-if="riskEvent.channel_result != null && ('10000000000'|withRole)">
<label class="control-label col-sm-2">Channel Handle Result</label> <label class="control-label col-sm-2">Channel Handle Result</label>
@ -447,7 +447,7 @@
ng-model="riskEventEdit.order_type" ng-model="riskEventEdit.order_type"
id="order-type-input" id="order-type-input"
required required
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value.label for (key, value) in orderTypes">
<option value="">Please Choose</option> <option value="">Please Choose</option>
</select> </select>
@ -461,7 +461,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEventEdit.order_type != 5" ng-if="orderTypes[riskEventEdit.order_type].partner_code_required"
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}"> ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="short-id-input">* Partner Code for="short-id-input">* Partner Code
@ -492,7 +492,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-if="riskEventEdit.order_type != 4" ng-if="orderTypes[riskEventEdit.order_type].platform_trans_textarea"
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}"> ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-ids-input">Platform Transaction IDs for="order-ids-input">Platform Transaction IDs
@ -513,9 +513,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"
ng-if="orderTypes[riskEventEdit.order_type].single_channel_order">
<label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="riskEvent.client_moniker"></p>
</div>
</div>
<div class="form-group" <div class="form-group"
ng-if="riskEventEdit.order_type == 5" ng-if="orderTypes[riskEventEdit.order_type].single_channel_order">
<label class="control-label col-sm-2">Platform Transaction IDs</label>
<div class="col-sm-6">
<p class="form-control-static">
{{riskEvent.order_ids}}
</p>
</div>
</div>
<div class="form-group"
ng-if="orderTypes[riskEventEdit.order_type].sub_mch_id_required"
ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}"> ng-class="{'has-error':riskEventForm.sub_merchant_id.$invalid && riskEventForm.sub_merchant_id.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-ids-input">Sub Merchant ID for="order-ids-input">Sub Merchant ID
@ -539,7 +557,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="receive-email-input"> for="receive-email-input">
{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}} {{orderTypes[riskEvent.order_type].date_label}}
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<div style="display: inline-block"> <div style="display: inline-block">
@ -549,7 +567,7 @@
ng-model="riskEventEdit.receive_email_date" ng-model="riskEventEdit.receive_email_date"
uib-datepicker-popup uib-datepicker-popup
size="10" size="10"
placeholder="{{(riskEvent.order_type == 1 || riskEvent.order_type ==2) ? 'Receive Date' : 'Create Date'}}" placeholder="{{orderTypes[riskEvent.order_type].date_label}}"
is-open="receiveDate.open" is-open="receiveDate.open"
ng-click="receiveDate.open=true" ng-click="receiveDate.open=true"
datepicker-options="{maxDate:today}"> datepicker-options="{maxDate:today}">
@ -617,7 +635,8 @@
</div> </div>
<div class="form-group" ng-if="riskEvent.order_type != 5"> <div class="form-group"
ng-if="orderTypes[riskEventEdit.order_type].can_send_to_mch">
<label class="control-label col-sm-2">是否发送商户</label> <label class="control-label col-sm-2">是否发送商户</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" <input type="checkbox"

@ -57,7 +57,7 @@
name="order_type" name="order_type"
ng-model="params.orderType" ng-model="params.orderType"
id="order-type-input" id="order-type-input"
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value.label for (key, value) in orderTypes">
<option value="">ALL</option> <option value="">ALL</option>
</select> </select>
</div> </div>

@ -180,11 +180,18 @@
<p><label class="control-label" style="cursor: pointer">Payer Card Information</label></p> <p><label class="control-label" style="cursor: pointer">Payer Card Information</label></p>
</div> </div>
<div ng-if="showPayerCardInfo"> <div ng-if="showPayerCardInfo">
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Bank: </label> {{order.card_bank}}</p> <p class="tradeCardInfo"><label style="padding-right: 20%;">Card Bank: </label>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Type: </label> {{order.card_type}}</p> {{order.card_bank}}</p>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Alias: </label> {{order.card_alias}}</p> <p class="tradeCardInfo"><label style="padding-right: 20%;">Card Type: </label>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Scheme: </label> {{order.card_scheme}}</p> {{order.card_type}}</p>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Country:</label> {{order.card_country}}</p> <p class="tradeCardInfo"><label style="padding-right: 20%;">Card Alias: </label>
{{order.card_alias}}</p>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Scheme: </label>
{{order.card_scheme}}</p>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Card Country:</label>
{{order.card_country}}</p>
<p class="tradeCardInfo"><label style="padding-right: 20%;">Enabled 3-DS:</label>
{{order.threeds_flag ? 'YES' : 'NO'}}</p>
</div> </div>
</div> </div>
<!--<div class="form-group">--> <!--<div class="form-group">-->

@ -426,7 +426,7 @@ img{
} }
@-webkit-@keyframes move { @-webkit-keyframes move {
0% { 0% {
bottom: 10px; bottom: 10px;
} }

Loading…
Cancel
Save