Merge branch 'develop'

# Conflicts:
#	pom.xml
master
luoyang 5 years ago
commit 33a17233de

@ -5,11 +5,11 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.1.6</version>
<version>2.1.8</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -301,6 +301,14 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
}
cleanLog.put("channels", channelsObj);
cleanLog.put("client_moniker", client.getString("client_moniker"));
//跨境商城支持
// JSONObject incremental = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
// if (incremental != null) {
// cleanLog.put("incremental_rate", incremental.getBigDecimal("incremental_rate_value"));
// cleanLog.putAll(incrementalAnalysisTransLogs(transactions));
// BigDecimal royalpayTax = cleanLog.getBigDecimal("tax_amount").subtract(cleanLog.getBigDecimal("incremental_tax"));
// cleanLog.put("royalpay_tax", royalpayTax.setScale(2, RoundingMode.HALF_UP));
// }
return cleanLog;
}
@ -1714,4 +1722,23 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
notices.add(new TodoNotice("settlement", settleDateSettingMsg, "#/analysis/clearing_logs/date_setting"));
}
}
private JSONObject incrementalAnalysisTransLogs(List<JSONObject> logs) {
final JSONObject analysis = new JSONObject();
analysis.put("real_royalpay_charge", logs.parallelStream()
.map(log -> getSymbol(log).multiply(log.getBigDecimal("royal_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("incremental_charge", logs.parallelStream()
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("incremental_tax", logs.parallelStream()
.filter(log -> StringUtils.equalsIgnoreCase("RP跨境商城", log.getString("source")))
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge")).divide(new BigDecimal(10), 2, RoundingMode.HALF_UP))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
return analysis;
}
private BigDecimal getSymbol(JSONObject log) {
return "Credit".equals(log.getString("transaction_type")) || "Settlement".equals(log.getString("channel")) ? BigDecimal.ONE : BigDecimal.valueOf(-1);
}
}

@ -1,12 +1,12 @@
package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;

@ -38,6 +38,7 @@ public class TradeLogQuery {
private int group_bd;
private String org_id;
private String org_id2;
private boolean onlyIncrementAmount = false;
public Integer getGatewayChild() {
return gatewayChild;
@ -105,6 +106,9 @@ public class TradeLogQuery {
if (StringUtils.isNotEmpty(org_id2)) {
params.put("org_id2", org_id2);
}
if (onlyIncrementAmount) {
params.put("onlyIncrementAmount", "1");
}
return params;
}
@ -252,4 +256,12 @@ public class TradeLogQuery {
public void setSource(String source) {
this.source = source;
}
public boolean isOnlyIncrementAmount() {
return onlyIncrementAmount;
}
public void setOnlyIncrementAmount(boolean onlyIncrementAmount) {
this.onlyIncrementAmount = onlyIncrementAmount;
}
}

@ -63,10 +63,7 @@ import org.springframework.ui.Model;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DateFormat;
@ -137,6 +134,8 @@ public class TradeLogServiceImpl implements TradeLogService {
// @Value("classpath:/jasper/trans_flow_new.jasper")
@Value("classpath:/jasper/partner_invoice_gst.jasper")
private org.springframework.core.io.Resource trans_flow;
@Value("classpath:/jasper/incremental_partner_invoice_gst.jasper")
private org.springframework.core.io.Resource incremental_trans_flow;
@Value("classpath:/jasper/royalpay_logo.png")
private org.springframework.core.io.Resource logo;
@Value("classpath:/jasper/trans_excel.jasper")
@ -256,13 +255,6 @@ public class TradeLogServiceImpl implements TradeLogService {
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role")) && !ManagerRole.ORG_MANAGER.hasRole(manager.getIntValue("role"))) {
params.put("bd_user", manager.getString("manager_id"));
}
if (query.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.remove("bd_user");
params.put("bd_group", manager.getString("manager_id"));
if (query.getGroup_bd() > 0) {
params.put("bd_group_bd", query.getGroup_bd());
}
}
orgManager.checkOrgIds(manager, params);
if (query.getGatewayChild() != null) {
params.put("trade_type", new ArrayList<Integer>() {{
@ -624,6 +616,20 @@ public class TradeLogServiceImpl implements TradeLogService {
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("royal_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_royalpay_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("royal_surcharge")
.add(log.getBigDecimal("surcharge_cashback"))
.add(log.getBigDecimal("channel_surcharge"))))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_incremental_surcharge", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_incremental_tax", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP)))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_surcharge", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge").add(log.getBigDecimal("tax_amount"))))
@ -696,7 +702,25 @@ public class TradeLogServiceImpl implements TradeLogService {
parmerters.put("jd_fee", takeDecimalOrDefault(analysis, "jd_fee", BigDecimal.ZERO));
parmerters.put("alipay_online_fee", takeDecimalOrDefault(analysis, "alipay_online_fee", BigDecimal.ZERO));
parmerters.put("gst", takeDecimalOrDefault(analysis, "tax_amount", BigDecimal.ZERO));
parmerters.put("royalpay_fee", takeDecimalOrDefault(analysis, "total_royalpay_fee", BigDecimal.ZERO));
parmerters.put("incremental_fee", takeDecimalOrDefault(analysis, "total_incremental_surcharge", BigDecimal.ZERO));
parmerters.put("incremental_gst", takeDecimalOrDefault(analysis, "total_incremental_tax", BigDecimal.ZERO));
parmerters.put("royalpay_gst", analysis.getBigDecimal("tax_amount").subtract(analysis.getBigDecimal("total_incremental_tax")).setScale(2,RoundingMode.HALF_UP));
dataList.parallelStream().forEach(item -> {
BigDecimal incrementalSurcharge = item.containsKey("incremental_surcharge") ? item.getBigDecimal("incremental_surcharge") : BigDecimal.ZERO;
BigDecimal taxAmount = item.containsKey("tax_amount") ? item.getBigDecimal("tax_amount") : BigDecimal.ZERO;
BigDecimal royalpaySurhcarge = item.containsKey("royal_surcharge") ? item.getBigDecimal("royal_surcharge") : BigDecimal.ZERO;
BigDecimal surhcargeBack = item.containsKey("surcharge_cashback") ? item.getBigDecimal("surcharge_cashback") : BigDecimal.ZERO;
BigDecimal channelSurcharge = item.containsKey("channel_surcharge") ? item.getBigDecimal("channel_surcharge") : BigDecimal.ZERO;
BigDecimal incrementalTax = incrementalSurcharge.divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal royalpayTax = taxAmount.subtract(incrementalTax);
BigDecimal realRoyalpayCharge = royalpaySurhcarge
.add(surhcargeBack)
.add(channelSurcharge)
.add(royalpayTax);
item.put("incremental_surcharge", incrementalSurcharge.add(incrementalTax).setScale(2, RoundingMode.HALF_UP));
item.put("real_royalpay_surcharge", realRoyalpayCharge.setScale(2, RoundingMode.HALF_UP));
scaleDecimalVal(item, "display_amount", item.getString("currency"));
String platformCurrency = PlatformEnvironment.getEnv().getForeignCurrency();
scaleDecimalVal(item, "clearing_amount", platformCurrency);
@ -708,7 +732,10 @@ public class TradeLogServiceImpl implements TradeLogService {
String fileName = client.getString("client_moniker") + "_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream();
byte[] bytes = JasperRunManager.runReportToPdf(trans_flow.getInputStream(), parmerters, jrDataSource);
// JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
JSONObject clientIncrement = null;
InputStream jasper = clientIncrement == null ? trans_flow.getInputStream() : incremental_trans_flow.getInputStream();
byte[] bytes = JasperRunManager.runReportToPdf(jasper, parmerters, jrDataSource);
outs.write(bytes, 0, bytes.length);
outs.flush();
outs.close();

@ -1,6 +1,6 @@
app:
rpaysvc:
appid: 3daefd62-3003-4a93-821e-5962d5ff67c2
appid: royalpaytest
priv-key: MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDE55tREo6t6m1hekGlaMmDivorV3a+MkA/Wna0k917u/CGYIf7FtmWk1um7VcBRdljluLjqThePZgbgtwqTdHWXJP2gPwoJjLUluVEyKh19blSgrq7K1FEryAzQ5XFLzMX//EMc1BNrqcREHC6XVlJeNzpOd8+C83cxGxL+ayLoQ/ePEyp/8yXBbA6t2yXyi7H1ry8WiFFg9RFf+zAeESFXlKIS72fw9I9GxG6PLUhbD8S+IIJ2A0ZudKUQIUw4M0wSilo40lfqp/xRyfUBZevKcPrO5/ZCJX6V2d154s1m5p0Z/eLtQ1ido0quVi/LzBb1KXDYNHV6hPJjNQmNbMnAgMBAAECggEAY/rqLW9LzVk0cwN947xiXg2qW2mM3KRtZP3NOoG+O37BcaoAQelnUILATfFDdVz/Ngc+a7TX71o9KvL2UfCztLHLW6ZA4y4KL1HzVkrA5yx/DjtdD36+RC7cHcuad8YwnmYSAm1nABrHr+12H9sYZCsfmLkO9tVNkWSXTLiY+UhJ1hTua2LYgaTsHR9lYLt/K+PNIBAToKuMcKFTEMWbrnekrFhXkPdeS3alFL/0X7csaPhLvZTDaAtpAytvnmN4nuZmnONnDqPJ3IEFjc7xwZ15D9Qgv/+g74q1VzU/0+2421S6BSijUK3kUdeHXASU3YvIczfnbr5t+NYL7nd68QKBgQDlLFNMz9rVFLd5b351tnld9rni8KzHi+V+eXeJpQ+zriTODOvvkFJrTSZKm+JQoBrpTI+EA1fovxLnDBhNnrR4HmHhudMTGqU6JOZLj+fk8UQKXDpVEGWO6QT68ds+Ii1ex1UEkbBkLWGrrHlFAdY0q+Af7L7Fe0osZX9382b+aQKBgQDb9EmDD79IFOxSjMJVnlN0g2P48hQ9M40cEzXRD/iyyBr9l8rE400Q6GT35ZgHKSrG2nXZehWCaQQqniHu+y6UHnJfhbC0LEYdcYRoyamlGwEFp8xSRJ88R2IoL+2g+XJ1Tc6eACjsEJWZooga6bqdrYjaAe0uSGid0Buh6JMTDwKBgGIfJFtS84MgJ55a2m5T/or4xIYiPhgCEfSg1Umd3qcz/JYseihMRr2ifq6bJ78VjfAt05TWSaFhjhpW12EEfoifmZEoGvOnCO9oNSJNLyCbHGLDMkaRiqoxouw++XwU7hASkJgwOLHrrFHwusuNCcXrgT6qAtRTAWMY4gbdtE9hAoGAWnZsTZUKbND+KS1vN9t4I3FuipK1tD4hiSx1c9iHxq/6OdZWNQfvSEbsT/CDyF4sE8EBu0I02n/qkMSc3Dc+fvjOvW60sEWNSMrJVHesaBVlJDhRFnzWqOoK+tBLgWtWodwwYFdcfUqM3LU2GSuL7xHSOSeVrvVk4ZMX6k1HQA0CgYAypY0eecX8Gc7SCt7wpYoNuL2MuZZIDXNZVMpWYMokA1Z74oX1uzecyTNLHgCFHpjiJPyc6KW1/pnDpcA9FuTmLUuNyuqsX85IEMZPkIqPFebAl4IvOuwzvXDPxxgh8B+XBQBydgFADeqgqXG8rxomC4PUrX47pKb1G89bTGp8Dw==
pub-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmifNnVZG6HZBYdvLnCGyNm7rQTZKyl3w+7xdBGgjsQeaskdy/IgmrWRG4Ii1o82KV/ZA+bw86vE37axpoxbqOU3LYVb69nVYvmJOL018iBs74HhbZ8CtWtQmEIKqmX/rNUdp15OgwzDckvrK/EEzjdOoQfAkFB68wLOsTcsRwBB3JUL/uiHGK6b5Ofmh4PxYeAVNpWYHyCaQIuN6JH85VHBVS4etP25GbgWxl+ktuZucaPsQ2G25mwhlpNiC28J4la0wD33JKMfCNCjORlWkw2HcDvrRLqza4lJOXu0rFy3JuUkZ0hn834ZWd3MboqNNE6a2xe4ppZUJ9ccM9312JQIDAQAB
server-root: https://channel.rpayplus.com/channel/v1/

@ -363,7 +363,7 @@
<if test="client_ids == null and client_id != null">
AND p.client_id = #{client_id}
</if>
LEFT JOIN pmt_transactions t
INNER JOIN pmt_transactions t
ON t.order_id = o.order_id
AND t.refund_id IS NULL
AND t.transaction_type = 'Credit'
@ -391,6 +391,9 @@
AND t.system_transaction_id = #{search_text}
</if>
</if>
<if test="onlyIncrementAmount != null">
AND t.incremental_surcharge >0
</if>
<if test="org_id != null and org_ids == null">
AND p.org_id = #{org_id}
</if>
@ -668,6 +671,9 @@
<if test="to!=null">and o.create_time &lt; #{to}</if>
<if test="date!=null">and date(o.create_time)=date(#{date})</if>
<if test="dev_id!=null">and binary o.dev_id=#{dev_id}</if>
<if test="onlyIncrementAmount != null">
AND t.incremental_surcharge >0
</if>
<if test="status!=null">
and
<foreach collection="status" item="std" open="(" close=")" separator=" or ">o.status=#{std}</foreach>

@ -1146,6 +1146,9 @@
<select id="listTransactionsOfClearingOrder" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT t.*,
(t.royal_surcharge + t.channel_surcharge + t.surcharge_cashback) as real_royal_surcharge,
round((t.incremental_surcharge * 0.1),2) as incremental_tax,
(t.tax_amount - round((t.incremental_surcharge * 0.1),2)) as royalpay_tax,
IFNULL(t.incremental_surcharge, 0.00) incremental_surcharge_settle,
o.display_amount,
o.client_order_id,
@ -1155,7 +1158,7 @@
o.order_detail,
o.dev_id,
o.source,
ifnull(sci.incremental_rate_value,0) as rate_value
ifnull(if(o.source='RP跨境商城',sci.incremental_rate_value,0),0) as rate_value
FROM pmt_transactions t
LEFT JOIN pmt_orders o ON o.order_id = t.order_id
LEFT JOIN pmt_refunds r ON r.refund_id = t.refund_id

@ -352,7 +352,7 @@ margin-bottom: 10%;"/>
</li>
<li ui-sref-active="active" ng-if="'tradelog'|withModule">
<a ui-sref="incremental_trade" ui-sref-opts="{reload:true}">
<i class="fa fa-list-alt"></i> <span>增值服务交易流水|Incremental Trades Logs</span>
<i class="fa fa-list-alt"></i> <span>R-Service交易统计</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('transAnalysis'|withModule) && (currentUser.org_id==null || currentUser.org_id==1)">

@ -253,10 +253,13 @@
<th>Currency</th>
<th>Input Amount</th>
<th>Total Amount</th>
<th>Surcharge Rate</th>
<th>Surcharge Amount</th>
<th>Surcharge rate for RoyalPay</th>
<th>Surcharge Amount for RoyalPay</th>
<th>GST Amount for RoyalPay</th>
<th>Surcharge rate for Mini Program</th>
<th>Surcharge Amount for Mini Program</th>
<th>GST Amount for Mini Program </th>
<th>Settle Amount</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
@ -269,10 +272,15 @@
<td ng-bind="tr.transaction_currency"></td>
<td ng-bind="tr.display_amount|currency:''"></td>
<td ng-bind="tr.transaction_amount|currency:''"></td>
<td ng-bind="tr.surcharge_rate|percentage:1"></td>
<td ng-bind="(tr.total_surcharge?tr.total_surcharge:0)|currency:''"></td>
<td>
{{(((tr.surcharge_rate * 100) > tr.rate_value)?((tr.surcharge_rate * 100-tr.rate_value)):(tr.surcharge_rate))|number:2}} %
</td>
<td ng-bind="(tr.real_royal_surcharge?tr.real_royal_surcharge:0)|currency:''"></td>
<td ng-bind="tr.royalpay_tax|currency:''"></td>
<td ng-bind="(tr.rate_value/100)|percentage:2"></td>
<td ng-bind="(tr.incremental_surcharge?tr.incremental_surcharge:0)|currency:''"></td>
<td ng-bind="tr.incremental_tax|currency:''"></td>
<td ng-bind="tr.settle_amount|currency:''"></td>
<td ng-bind="tr.tax_amount|currency:''"></td>
<td ng-bind="tr.remark"></td>
</tr>
</tbody>
@ -289,10 +297,13 @@
<th>Transaction Time</th>
<th>Currency</th>
<th>Total Amount</th>
<th>Surcharge Rate</th>
<th>Surcharge Amount</th>
<th>Surcharge rate for RoyalPay</th>
<th>Surcharge Amount for RoyalPay</th>
<th>GST Amount for RoyalPay</th>
<th>Surcharge rate for Mini Program</th>
<th>Surcharge Amount for Mini Program</th>
<th>GST Amount for Mini Program </th>
<th>Settle Amount</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
@ -304,14 +315,19 @@
<td ng-bind="tr.transaction_time"></td>
<td ng-bind="tr.transaction_currency"></td>
<td ng-bind="tr.transaction_amount|currency:''"></td>
<td ng-bind="tr.surcharge_rate|percentage:1"></td>
<td ng-bind="(tr.total_surcharge?tr.total_surcharge:0)|currency:''"></td>
<td>
{{(((tr.surcharge_rate * 100) > tr.rate_value)?((tr.surcharge_rate * 100-tr.rate_value)):(tr.surcharge_rate))|number:2}} %
</td>
<td ng-bind="(tr.real_royal_surcharge?tr.real_royal_surcharge:0)|currency:''"></td>
<td ng-bind="tr.royalpay_tax|currency:''"></td>
<td ng-bind="(tr.rate_value/100)|percentage:2"></td>
<td ng-bind="(tr.incremental_surcharge?tr.incremental_surcharge:0)|currency:''"></td>
<td ng-bind="tr.incremental_tax|currency:''"></td>
<td ng-bind="tr.settle_amount|currency:''"></td>
<td ng-bind="tr.tax_amount|currency:''"></td>
<td ng-bind="tr.remark"></td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
</section>

@ -0,0 +1,177 @@
.qrpay-background {
position: fixed;
background: #f2f2f2;
top: 0;
bottom: 0;
right: 0;
left: 0;
z-index: -1;
}
section.content {
position: absolute;
top: 70px;
bottom: 64px;
width: 100%;
overflow: auto;
left: 0;
}
.qrpay-container {
width: 700px;
position: relative;
display: block;
margin: 40px auto;
background: #fff;
overflow: visible;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
}
.qrpay-container .qr-brand {
width: 100%;
height: 80px;
padding-top: 20px;
}
.qrpay-container .qr-brand.wechat {
background: #09bb07;
}
.qrpay-container .qr-brand.alipay {
background: #1eabeb;
}
.qrpay-container .qr-brand > .wechat-logo {
display: block;
margin: auto;
height: 40px;
}
.qrpay-container .price-box {
position: relative;
display: block;
margin: 15px auto;
width: 240px;
}
.qrpay-container .price-box:after {
content: '';
display: block;
clear: both;
}
.qrpay-container .price-box .exchange-rate {
font-size: 16px;
display: block;
}
.qrpay-container .price-box .price {
font-size: 22px;
float: left;
line-height: 28px;
}
.qrpay-container .price-box .price-left {
font-weight: bold;
border-right: 2px solid #666;
padding-right: 10px;
}
.qrpay-container .price-box .price-right {
padding-left: 10px;
width: 49%;
white-space: nowrap;
text-align: left;
}
.qrpay-container .card-input-box {
width: 100%;
text-align: center;
border: none;
}
.qrpay-container .qrcode-img {
width: 140px;
height: 140px;
position: relative;
display: block;
margin: auto;
}
.qrpay-container .qr-footer {
position: relative;
bottom: 0;
border-radius: 0 0 10px 10px;
width: 100%;
padding: 10px;
background: #f7f7f7;
color: #000;
}
.qrpay-container .qr-footer .form-group {
margin-bottom: 2px;
font-size: 12px;
line-height: 12px;
}
.qrpay-container .qr-desc {
position: absolute;
height: 150px;
z-index: 999;
top: 140px;
right: 30px;
}
.qrpay-container .btn{
border-radius: 0;
}
#footer {
position: absolute;
width: 100%;
bottom: 0;
}
@media (max-width: 997px) {
section.content {
width: 100%;
position: relative;
bottom: 0;
top: 0;
overflow: visible;
}
.qrpay-container {
width: 100%;
}
#footer {
position: relative;
}
.qr-desc {
display: none;
}
}
@media (min-width: 768px) {
.dl-horizontal dd {
margin-left: 180px;
line-height: 32px;
}
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 32px;
}
}

@ -23,6 +23,7 @@ section.content {
display: block;
margin: 40px auto;
background: #fff;
border-radius: 10px;
overflow: visible;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.30);
}
@ -150,4 +151,4 @@ section.content {
.qr-desc{
display: none;
}
}
}

@ -148,7 +148,7 @@
<div class="description-block">
<img src="/static/images/main_menu/transaction_flow.png"/>
<div class="description-text">
<span class="description-text">增值服务交易流水</span>
<span class="description-text">R-Service交易统计</span>
</div>
</div>
</a>

@ -7,10 +7,10 @@
<tr>
<th>Logo</th>
<th>Channel</th>
<th>Mode</th>
<th>Rate Value</th>
<th>Amount</th>
<th>Operator</th>
<th>remark</th>
<th>Create Time</th>
<th>Update Time</th>
<th>Operation</th>
@ -20,10 +20,10 @@
<tr ng-repeat="service in serviceAll">
<td style="max-width: 160px;line-height: 90px"><img style=" height:80px; max-width: 180px;"ng-src="{{service.logo_url}}"/></td>
<td style="line-height: 90px">{{service.channel}}</td>
<td style="line-height: 90px">{{service.incremental_mode==1?'固定手续费':'固定金额扣款' }}</td>
<td style="line-height: 90px">{{service.incremental_rate_value!=null?service.incremental_rate_value+'%':'-'}}</td>
<td style="line-height: 90px">{{service.total_incremental_amount}}</td>
<td style="line-height: 90px">{{service.operator}}</td>
<td style="line-height: 90px">{{service.title}}</td>
<td style="line-height: 90px">{{service.create_time}}</td>
<td style="line-height: 90px">{{service.update_time}}</td>
<td style="line-height: 90px">

@ -213,18 +213,15 @@
</div>
</div>
<div class="form-group col-xs-12" ng-if="'1000000000'|withRole">
<label class="control-label col-xs-4 col-sm-2">My Group</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label>
</p>
<div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">
产生增值服务费交易
</label>
<div class="col-xs-8 col-sm-4">
<div class="checkbox-inline">
<input type="checkbox" id="only-mine-search"
ng-model="params.onlyIncrementAmount" ng-click="loadTradeLogs(1)">
</div>
</div>
</div>

@ -1,19 +1,37 @@
$(function () {
let $container = $('.qr-img-box')[0];
let cardFrame = window.channel_account_id ? TokenInputFrame($container, window.channel_account_id) : CardInputFrame($container);
let $container = $('.card-input-box')[0];
let cardFrame = window.channel_account_id ? new TokenInputFrame($container, window.channel_account_id) : new CardInputFrame($container);
cardFrame.onSuccess = function (secretData) {
$.ajax({
url: 'commit',
data: JSON.stringify(secretData),
contentType: 'application/json',
method: 'POST',
success: function () {
startCheckOrder(window.client_moniker, window.partner_order_id);
},
error: function (jqXHR) {
let errorText = jqXHR.responseText;
let err = JSON.parse(errorText);
if(err){
$('#errorMsgBox').text(err.message).show();
}
}
})
};
cardFrame.frameStyle = {
width: '100%',
height: '400px',
border: 'none',
borderRadius: '10px'
};
cardFrame.onError = function (msg) {
$('#errorMsgBox').text(msg).show();
};
cardFrame.show();
$('#payBtn').click(function () {
$('#errorMsgBox').hide();
cardFrame.commit();
});
@ -35,4 +53,4 @@ $(function () {
checkOrderStd();
}
});
});

@ -14,27 +14,27 @@ $(function () {
window.redirect = redirect;
}
}
if (window.disable_ws) {
setTimeout(checkStatus, 3000);
} else {
var sock = new SockJS('/register');
var client = Stomp.over(sock);
client.connect({}, function () {
client.subscribe('/app/payment/orders/' + window.order_id, function (msg) {
var json = JSON.parse(msg.body);
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + json.time + '&nonce_str=' + json.nonce_str + '&sign=' + json.sign;
})
},function () {
setTimeout(checkStatus, 3000);
})
}
setTimeout(checkStatus, 3000);
// if (window.disable_ws) {
//
//
// } else {
//
// var sock = new SockJS('/register');
// var client = Stomp.over(sock);
// client.connect({}, function () {
// client.subscribe('/app/payment/orders/' + window.order_id, function (msg) {
// var json = JSON.parse(msg.body);
// var concat = '?';
// if (window.redirect.indexOf('?') > 0) {
// concat = '&';
// }
// location.href = window.redirect + concat + 'time=' + json.time + '&nonce_str=' + json.nonce_str + '&sign=' + json.sign;
// })
// },function () {
// setTimeout(checkStatus, 3000);
// })
// }
function checkStatus() {
$.ajax({
url: 'status',
@ -54,4 +54,4 @@ $(function () {
}
})
}
});
});

@ -0,0 +1,37 @@
package au.com.royalpay.payment.manage.task;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.RPayPaymentCardSvcApi;
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import com.alibaba.fastjson.JSONObject;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* Create by davep at 2020-04-09 18:15
*/
@SpringBootTest
@ActiveProfiles("officedev,wechat,jd,alipay,bestpay,rpay,yeepay,lakala,rppaysvc")
@RunWith(SpringJUnit4ClassRunner.class)
public class RegisterRpPaymentMch {
@Autowired
private RPayPaymentCardSvcApi api;
@Autowired
private MerchantInfoProvider mchInfoProvider;
@Autowired
private ManagerMapper managerMapper;
@Test
public void register() {
JSONObject client = mchInfoProvider.getClientInfoByMoniker("MATX");
JSONObject manager = managerMapper.findByLoginId("yixian");
api.apply(client, new EmptyMerchantApplication(), manager);
}
}

@ -68,7 +68,7 @@ server {
}
location ~ ^/api/v1.0/((jd)|(customs)|(alipay)|(rpay)|(yeepay)|(lakala_pay)|(cb_bankpay)|(bestpay)|(hf)|(wechat_jsapi_gateway)|(h5_payment)|(gateway)|(hf_gateway)|(jd_gateway)|(micropay)|(retail_qrcode)|(jsapi_gateway)|(share_code)|(payment))/ {
location ~ ^/api/v1.0/((jd)|(customs)|(alipay)|(rpay)|(yeepay)|(card_payment_view)|(lakala_pay)|(cb_bankpay)|(bestpay)|(hf)|(wechat_jsapi_gateway)|(h5_payment)|(gateway)|(hf_gateway)|(jd_gateway)|(micropay)|(retail_qrcode)|(jsapi_gateway)|(share_code)|(payment))/ {
proxy_pass http://rppaycenter;
proxy_http_version 1.1;

Loading…
Cancel
Save