add card payment support

master
luoyang 5 years ago
parent b0e1c5f259
commit 77852b44ae

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.1.16</version>
<version>2.1.17</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>

@ -5,7 +5,6 @@ import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisti
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
@ -17,7 +16,6 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -45,6 +43,8 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
listChannel.add(putParam(params,"Rpay"));
listChannel.add(putParam(params,"Yeepay"));
listChannel.add(putParam(params,"LakalaPay"));
listChannel.add(putParam(params,"rpaypmt_card"));
listChannel.add(putParam(params,"rpaypmt_dd"));
return listChannel;
}
@ -55,7 +55,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
}
List<JSONObject> list = new ArrayList<>();
Map<Date,JSONObject> analysisMap = new TreeMap<>();
String[] channels = {"Wechat","Bestpay","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay","LakalaPay"};
String[] channels = {"Wechat","Bestpay","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay","LakalaPay","rpaypmt_card","rpaypmt_dd"};
for (String channel:channels){
analysisChannelCustomers(params, analysisMap, channel);
}

@ -11,7 +11,6 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerCustomerRelationAlipayMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
@ -28,7 +27,6 @@ import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -100,6 +98,8 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
channels.add("hf");
channels.add("jd");
channels.add("LakalaPay");
channels.add("rpaypmt_card");
channels.add("rpaypmt_dd");
params.put("channels", channels);
}
result.put("channels", customerAndOrdersStatisticsMapper.getCBBankChannelAmount(params));

@ -334,6 +334,12 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
res.put("today",today);
res.put("yes",yes);
res.put("not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
params.put("channel", "system");
res.put("sys_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
params.put("channel", "rpaypmt_card");
res.put("rpaypmt_card_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
params.put("channel", "rpaypmt_dd");
res.put("rpaypmt_dd_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
res.put("trade_amount_rise",yes.getBigDecimal("trade_amount").compareTo(BigDecimal.ZERO)>0 ? (today.getBigDecimal("trade_amount").subtract(yes.getBigDecimal("trade_amount"))).divide(yes.getBigDecimal("trade_amount"), 4, RoundingMode.HALF_UP):BigDecimal.ZERO);
res.put("trade_count_rise", yes.getIntValue("trade_count") > 0 ? (today.getBigDecimal("trade_count").subtract(yes.getBigDecimal("trade_count"))).divide(yes.getBigDecimal("trade_count"), 4, RoundingMode.HALF_UP) : 0);
res.put("customers_rise", yes.getIntValue("customers") > 0 ? (today.getBigDecimal("customers").subtract(yes.getBigDecimal("customers"))).divide(yes.getBigDecimal("customers"), 4, RoundingMode.HALF_UP) : 0);
@ -604,7 +610,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
}
}
private JSONObject getTodayChannelCount(JSONObject params){
String[] channels = new String[]{"Bestpay","Wechat","Alipay","jd","AlipayOnline","hf", "Rpay","Yeepay","LakalaPay"};
String[] channels = new String[]{"Bestpay", "Wechat", "Alipay", "jd", "AlipayOnline", "hf", "Rpay", "Yeepay", "LakalaPay", "rpaypmt_card", "rpaypmt_dd"};
JSONObject resp = new JSONObject();
for(String channel:channels) {
params.put("channel", channel);

@ -15,11 +15,9 @@ import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
@ -36,21 +34,16 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yixian on 2017-02-07.
*/
@ -88,7 +81,7 @@ public class BDPrizeServiceImpl implements BDPrizeService {
private static BigDecimal percent = new BigDecimal(100);
private static String[] channels = new String[]{"Wechat", "Alipay", "Bestpay", "jd", "AlipayOnline","hf", "Rpay","Yeepay","LakalaPay"};
private static String[] channels = new String[]{"Wechat", "Alipay", "Bestpay", "jd", "AlipayOnline","hf", "Rpay","Yeepay","LakalaPay", "rpaypmt_card", "rpaypmt_dd"};
private static Logger logger = LoggerFactory.getLogger(BDPrizeServiceImpl.class);
@Override

@ -6,12 +6,9 @@ import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify;
import au.com.royalpay.payment.manage.task.PostponeClientTask;
import au.com.royalpay.payment.tools.scheduler.SynchronizedScheduler;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
@ -20,13 +17,12 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
/**
* @author kira
* @date 2018/8/2
@ -103,9 +99,9 @@ public class ManualServiceimpl implements ManualService {
record.put("manager_name", "System");
record.put("remark", "费率到期系统自动延期1年");
clientRateMapper.saveRate(record);
if ("Rpay".equals(o.getString("rate_name"))) {
rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id));
}
// if ("Rpay".equals(o.getString("rate_name"))) {
// rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id));
// }
});
}

@ -4,8 +4,8 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.time.DateUtils;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Calendar;
import java.util.Date;
@ -39,6 +39,8 @@ public class ClientRateConfig {
@NotNull(message = "error.payment.valid.param_missing")
private Integer cleanDays = 3;
private String remark;
@JSONField(name = "ext_rates")
private String extRates;
public JSONObject toJSON() {
if (expiryTime.before(activeTime)) {
@ -102,4 +104,12 @@ public class ClientRateConfig {
public void setTransactionFee(Double transactionFee) {
this.transactionFee = transactionFee;
}
public String getExtRates() {
return extRates;
}
public void setExtRates(String extRates) {
this.extRates = extRates;
}
}

@ -29,6 +29,8 @@ public interface ClientManager {
JSONObject getSysRateConfig();
JSONObject getSysCardRateConfig();
JSONObject getClientInfo(int clientId);
JSONObject getClientInfoIgnoreInvalid(int clientId);
@ -564,4 +566,8 @@ public interface ClientManager {
boolean getMergeSettleStatus(JSONObject client);
void changeExtParams(String clientMoniker,JSONObject manager, JSONObject params);
JSONObject applyMWMerchantId(String clientMoniker, JSONObject manager);
JSONObject queryMWMerchantIdStatus(String clientMoniker, JSONObject manager);
}

@ -5,6 +5,9 @@ import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
import au.com.royalpay.payment.channels.rpay.runtime.RpayApi;
import au.com.royalpay.payment.channels.rpay.runtime.beans.SubRpayMerchantInfo;
import au.com.royalpay.payment.channels.rpaypaymentsvc.mappers.RPayMerchantMapper;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.RPayPaymentCardSvcApi;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
@ -14,6 +17,8 @@ import au.com.royalpay.payment.channels.yeepay.config.YeePayConfig;
import au.com.royalpay.payment.channels.yeepay.mappers.YeePayClientConfigMapper;
import au.com.royalpay.payment.channels.yeepay.runtime.YeePayClient;
import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.mappers.SysClientMapper;
@ -314,6 +319,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RetailRSvcService retailRSvcService;
@Resource
private RServicesApplyService rServicesApplyService;
@Resource
private RPayPaymentCardSvcApi rPayPaymentCardSvcApi;
@Resource
private RPayMerchantMapper rPayMerchantMapper;
@Resource
@ -352,6 +361,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return JSONObject.parseObject(rateConfig);
}
@Override
public JSONObject getSysCardRateConfig() {
String rateConfig = sysConfigManager.getSysConfig().getString("sys_card_rates");
return JSONObject.parseObject(rateConfig);
}
@Override
@Cacheable(value = ":app_client_info:", key = "''+#clientId", unless = "#result == null")
public JSONObject getClientInfo(int clientId) {
@ -1940,6 +1955,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (rate.get("clean_days") == null) {
rate.put("clean_days", clientConfig.getIntValue("clean_days"));
}
if (StringUtils.equalsIgnoreCase("rpaypmt_card", rate.getString("rate_name"))) {
rate.put("ext_rates", JSONObject.parseObject(rate.getString("ext_rates")));
}
}
} catch (Exception ignore) {
}
@ -2000,6 +2018,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
config.put("active_time", DateFormatUtils.format(config.getDate("active_time"), "yyyy-MM-dd"));
config.put("expiry_time", DateFormatUtils.format(config.getDate("expiry_time"), "yyyy-MM-dd"));
if (isAddCardPaymentRate(config, clientId)) {
return;
}
checkAddRate(config, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
checkAddRate(config, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
checkAddRate(config, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
@ -2039,6 +2060,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1));
clientRateMapper.updateConfig(rateLog);
}
if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))) {
JSONObject extRateParams = new JSONObject(){{
put("domestic_rate_value", config.getBigDecimal("rate_value"));
put("overseas_rate_value", config.getBigDecimal("international_rate_value"));
}};
newConfig.put("ext_rates", extRateParams.toJSONString());
}
clientRateMapper.saveRate(newConfig);
logger.info(clientId + "的" + channel + "费率设置成功");
}
@ -2064,13 +2092,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
configJson.put("manager_name", manager.getString("username"));
configJson.put("update_time", new Date());
clientRateMapper.updateConfig(configJson);
if ("Rpay".equals(configJson.getString("rate_name"))) {
rpayApi.modifySurchargeConfig(client);
}
// if ("Rpay".equals(configJson.getString("rate_name"))) {
// rpayApi.modifySurchargeConfig(client);
// }
int clientId = client.getIntValue("client_id");
JSONObject changeRate = merchantInfoProvider.clientCurrentRate(clientId, new Date(), "Wechat");
int cleanDays = changeRate.getIntValue("clean_days");
if (cleanDays != client.getIntValue("clean_days")) {
if (cleanDays != client.getIntValue("clean_days") && StringUtils.equalsIgnoreCase("Wechat",config.getRateName())) {
clientModifySupport.processClientConfigModify(new ClearDaysModify(manager, clientMoniker, cleanDays));
}
// clientMapper.updateCleanDays(clientId, config.getCleanDays());
@ -6255,9 +6283,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
record.put("manager_name", "System");
record.put("remark", "费率到期系统自动延期1年");
clientRateMapper.saveRate(record);
if ("Rpay".equals(o.getString("rate_name"))) {
rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id));
}
// if ("Rpay".equals(o.getString("rate_name"))) {
// rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id));
// }
}
adminAccounts.forEach(o -> {
sendClientPostponeNotify(o, expireDate);
@ -6812,4 +6840,48 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(client);
}
@Override
public JSONObject applyMWMerchantId(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
MerchantApplicationResult result = rPayPaymentCardSvcApi.apply(client, new EmptyMerchantApplication(), manager);
if (result == null) {
throw new ServerErrorException("Failed To Apply For Merchant Warrior Sub Merchant ID");
}
RPayMerchantEntity existsEntity = rPayMerchantMapper.findMerchant(client.getIntValue("client_id"));
return new JSONObject(){{
put("card_sub_merchant_id", existsEntity.getRpMerchantId());
put("available", existsEntity.isAvailable());
put("pending", existsEntity.isPending());
}};
}
@Override
public JSONObject queryMWMerchantIdStatus(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
RPayMerchantEntity result = rPayPaymentCardSvcApi.findMerchant(client);
if (result == null) {
return new JSONObject();
}
return new JSONObject(){{
put("card_sub_merchant_id", result.getRpMerchantId());
put("available", result.isAvailable());
put("pending", result.isPending());
}};
}
private boolean isAddCardPaymentRate(JSONObject config, int clientId) {
if (!StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))
&& !StringUtils.equalsIgnoreCase("rpaypmt_dd", config.getString("type"))) {
return false;
}
configNewClientRate(config, clientId, config.getString("type"), "rate_value", null, null);
return true;
}
}

@ -493,6 +493,11 @@ public class PartnerManageController {
return clientManager.getSysRateConfig();
}
@GetMapping("/sys_card_rates")
public JSONObject getSysCardRate() {
return clientManager.getSysCardRateConfig();
}
@ManagerMapping(value = "/{clientMoniker}/rates/{rateId}", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF})
public void updateRate(@PathVariable String clientMoniker, @PathVariable int rateId, @RequestBody @Valid ClientRateConfig config, Errors errors,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
@ -880,4 +885,16 @@ public class PartnerManageController {
@RequestBody JSONObject params){
clientManager.changeExtParams(clientMoniker,manager,params);
}
@ManagerMapping(value = "/{clientMoniker}/applyMWMerchantId",method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public JSONObject applyMWMerchantId(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.applyMWMerchantId(clientMoniker,manager);
}
@ManagerMapping(value = "/{clientMoniker}/queryMWMerchantIdStatus",method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public JSONObject queryMWMerchantIdStatus(@PathVariable("clientMoniker")String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
return clientManager.queryMWMerchantIdStatus(clientMoniker,manager);
}
}

@ -434,6 +434,13 @@ public class TradeLogServiceImpl implements TradeLogService {
break;
}
order.put("status_str", statusStr);
if (StringUtils.equalsIgnoreCase("rpaypmt_card", order.getString("channel"))
|| StringUtils.equalsIgnoreCase("rpaypmt_dd", order.getString("channel"))) {
JSONObject extParams = JSONObject.parseObject(order.getString("ext_params"));
if (extParams != null) {
order.putAll(extParams);
}
}
return order;
}

@ -356,6 +356,12 @@
ifnull(sum(CASE WHEN s.channel = 'LakalaPay' THEN s.total ELSE 0 END),0) lakalapayamount,
ifnull(sum(CASE WHEN s.channel = 'LakalaPay' THEN s.orders ELSE 0 END),0) lakalapay_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'LakalaPay',TRUE,NULL)),0) lakala_client_count,
ifnull(sum(CASE WHEN s.channel = 'rpaypmt_card' THEN s.total ELSE 0 END),0) rpaypmt_cardpayamount,
ifnull(sum(CASE WHEN s.channel = 'rpaypmt_card' THEN s.orders ELSE 0 END),0) rpaypmt_card_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'rpaypmt_card',TRUE,NULL)),0) rpaypmt_card_client_count,
ifnull(sum(CASE WHEN s.channel = 'rpaypmt_dd' THEN s.total ELSE 0 END),0) rpaypmt_ddpayamount,
ifnull(sum(CASE WHEN s.channel = 'rpaypmt_dd' THEN s.orders ELSE 0 END),0) rpaypmt_dd_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'rpaypmt_dd',TRUE,NULL)),0) rpaypmt_dd_client_count,
ifnull(sum(s.orders), 0) all_count,
ifnull(sum(s.total), 0) all_amount,
ifnull(COUNT(DISTINCT s.client_id),0) all_client_count
@ -409,12 +415,16 @@
ifnull(SUM(IF(channel='jd' and transaction_type='Credit',clearing_amount,0)),0) jdamount,
ifnull(SUM(IF(channel='LakalaPay' and transaction_type='Credit',1,0)),0) lakala_order_count,
ifnull(SUM(IF(channel='LakalaPay' and transaction_type='Credit',clearing_amount,0)),0) lakalapayamount,
ifnull(SUM(IF(channel='rpaypmt_card' and transaction_type='Credit',1,0)),0) rpaypmt_card_order_count,
ifnull(SUM(IF(channel='rpaypmt_card' and transaction_type='Credit',clearing_amount,0)),0) rpaypmt_cardamount,
ifnull(SUM(IF(channel='rpaypmt_dd' and transaction_type='Credit',1,0)),0) rpaypmt_dd_order_count,
ifnull(SUM(IF(channel='rpaypmt_dd' and transaction_type='Credit',clearing_amount,0)),0) rpaypmt_ddamount,
count(distinct order_id) all_count,
count(distinct client_id) all_client_count,
ifnull(SUM(IF(transaction_type='Credit',clearing_amount,0)),0) all_amount
FROM pmt_transactions WHERE
channel IN
('Bestpay','Yeepay','Rpay','hf','jd','LakalaPay')
('Bestpay','Yeepay','Rpay','hf','jd','LakalaPay','rpaypmt_card','rpaypmt_dd')
<if test="begin!=null">and create_time &gt;= #{begin}</if>
<if test="end!=null">and create_time &lt; #{end}</if>
</select>

@ -152,7 +152,8 @@
<select id="analysisNotSettled" resultType="java.lang.Double">
<![CDATA[
SELECT ifnull(sum(if(pt.transaction_type = 'Credit', pt.clearing_amount, -pt.clearing_amount)), 0)
SELECT
ifnull(sum(if(pt.transaction_type = 'Credit', pt.clearing_amount, -pt.clearing_amount)), 0)
FROM pmt_transactions pt
LEFT JOIN sys_clients sc on sc.client_id = pt.client_id
WHERE pt.clearing_status = 0
@ -169,6 +170,13 @@
<if test="hide_sub_mch">
and (sc.client_id=#{client_id} or sc.parent_client_id = #{client_id})
</if>
<if test="channel!=null and channel=='system'">
and pt.channel !='rpaypmt_card'
and pt.channel !='rpaypmt_dd'
</if>
<if test="channel!=null and channel!='system'">
and pt.channel = #{channel}
</if>
</select>
<select id="analysisPreAmount" resultType="java.lang.Double">

@ -739,7 +739,8 @@
ifnull(o.refund_amount, 0) refund_fee,
sum(t.clearing_amount) clearing_amount,
t.exchange_rate,
t.clearing_status = 2 pre_auth
t.clearing_status = 2 pre_auth,
o.ext_params
FROM pmt_orders o
INNER JOIN sys_clients p ON p.client_id = o.client_id AND p.is_valid = 1
LEFT JOIN pmt_transactions t

@ -159,6 +159,26 @@
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/card_payment_sign.png"/>Card Payment</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannel.rpaypmt_cardamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannel.rpaypmt_card_order_count }}</label>
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/direct_debit_sign.png"/>Direct Debit</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannel.rpaypmt_ddamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannel.rpaypmt_dd_order_count }}</label>
</div>
</div>
</div>
</div>
</div>
</div>

@ -96,7 +96,11 @@ Ye<style>
<a role="button" ng-class="{'bg-primary':params.channel=='Yeepay'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LakalaPay'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>

@ -106,7 +106,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LakalaPay'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>

@ -104,7 +104,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>

@ -108,7 +108,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>
@ -263,6 +267,28 @@
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><small><img src="/static/images/card_payment_sign.png"/>Card Payment</small></div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_cardpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpaypmt_card_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpaypmt_card_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><small><img src="/static/images/direct_debit_sign.png"/>Direct Debit</small></div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_ddpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpaypmt_dd_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpaypmt_dd_client_count }}</label>
</div>
</div>
</div>
</div>
<!--<table class="table">
<tr>

@ -87,7 +87,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';doAnalysis(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>
@ -230,6 +234,28 @@
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/card_payment_sign.png"/>Card Payment</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_cardpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpaypmt_card_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpaypmt_card_client_count }}</label>
</div>
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/direct_debit_sign.png"/>Direct Debit</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_ddpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.rpaypmt_dd_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.rpaypmt_dd_client_count }}</label>
</div>
</div>
</div>
</div>

@ -46,7 +46,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';doAnalysis(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';doAnalysis(1)">Direct Debit</a>
</p>
</div>
</div>

@ -38,14 +38,19 @@ define(['../app'], function (app) {
}
}]);
app.controller('orderDetailDialogCtrl', ['$scope', 'order','$http', function ($scope, order,$http) {
$scope.showPayerCardInfo = true;
$scope.order = order.data;
$scope.getPayLocation=function (ip) {
$http.get('/dev/ip/'+ip).then(function (res) {
$scope.pay_location = res.data.city;
})
}
$scope.hidePayerCardInfo = function () {
$scope.showPayerCardInfo = !$scope.showPayerCardInfo;
}
}]);
app.controller('orderDetailEditCtrl', ['$scope', '$http', 'commonDialog', 'order', function ($scope, $http, commonDialog,order) {
$scope.showPayerCardInfo = true;
$scope.order = order.data;
$scope.updateDetail = function (order) {
$http.put('/client/partner_info/trade_logs/'+$scope.order.order_id, $scope.order).then(function () {
@ -56,6 +61,10 @@ define(['../app'], function (app) {
});
})
};
$scope.hidePayerCardInfo = function () {
$scope.showPayerCardInfo = !$scope.showPayerCardInfo;
}
}]);
});
});

@ -1,3 +1,10 @@
<style>
.tradeCardInfo {
padding-left: 25%;
margin: 0;
color: gray;
}
</style>
<div class="modal-header bg-success">
<h4>Order Detail
<a role="button" class="text-bold text-info pull-right" jsonview="order" title="JSON View" ng-if="'100000000'|withRole">
@ -168,6 +175,18 @@
<p class="form-control-static" ng-bind="order.order_detail"></p>
</div>
</div>
<div class="form-group" ng-if="order.channel=='rpaypmt_card' || order.channel=='rpaypmt_dd'">
<div style="text-align: center;">
<p ng-click="hidePayerCardInfo()"><label class="control-label" style="cursor: pointer;padding-right: 0;color: gray;">—————————— Payer Card Information ——————————</label></p>
</div>
<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 Type: </label> {{order.card_type}}</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>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-3">Remark</label>-->
<!--<div class="col-xs-9">-->

@ -575,8 +575,12 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
}]);
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog','company_info', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog,company_info) {
$scope.showUnSettleDetail = false;
$scope.company_info = company_info.data || {};
$scope.sendMailCount = 0;
$scope.hideNotSettleDetail = function () {
$scope.showUnSettleDetail = !$scope.showUnSettleDetail;
};
$scope.scales = [
{
key: 'today',

@ -357,8 +357,19 @@
<span class="mini-stat-icon bg-light"><i class="glyphicon glyphicon-btc text-info"></i></span>
<div class="mini-stat-info text-right text-light f-14">
<span class="counter text-white" style="font-size: 24px">
{{transcommon.not_settled|currency:'AUD '}}
{{transcommon.not_settled|currency:'AUD '}} <i class="fa fa-ellipsis-v" ng-click="hideNotSettleDetail()" style="cursor: pointer"></i>
</span>
<div ng-if="showUnSettleDetail">
<span class="counter text-white" style="font-size: 1px">
System : {{transcommon.sys_not_settled|currency:'AUD '}}
</span>
<span class="counter text-white" style="font-size: 1px">
Card Payment : {{transcommon.rpaypmt_card_not_settled|currency:'AUD '}}
</span>
<span class="counter text-white" style="font-size: 1px">
Direct Debit : {{transcommon.rpaypmt_dd_not_settled|currency:'AUD '}}
</span>
</div>
UNSETTLED
<br>
<a role="button" id="manual-settle" ng-click="toShowUnSettledDialog()" ng-if="manual_settle&&([1]|withRole)&&(currentUser.client_moniker=='MEGP' ||currentUser.client_moniker=='PINE')">

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -176,7 +176,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -371,6 +375,8 @@
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id}}
</td>
<td>

@ -2643,9 +2643,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
$scope.getBalance();
$scope.getBankAccount();
$scope.getRates = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/rates').then(function (resp) {
@ -2656,7 +2654,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
});
};
$scope.skipClearing = function (skipClearing) {
if (!$scope.init.skip_clearing) {
$scope.init.skip_clearing = true;
@ -2688,7 +2685,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
}
};
$scope.surchargeAccountDetail = function () {
$uibModal.open({
templateUrl: '/static/payment/surchargeaccount/templates/partner_surcharge_account_dialog.html',
@ -2711,7 +2707,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.getBalance();
});
};
$scope.allowSurchargeCredit = function (allowSurchargeCredit) {
if (!$scope.init.allow_surcharge_credit) {
$scope.init.allow_surcharge_credit = true;
@ -2729,7 +2724,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.getBankAccount();
})
};
$scope.switchPreSettle = function (presettle) {
if (!$scope.init.enable_presettle) {
$scope.init.enable_presettle = true;
@ -2739,7 +2733,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.getBankAccount();
})
};
$scope.customerTaxFree = function (customerTaxFree) {
if (!$scope.init.customer_tax_free) {
$scope.init.customer_tax_free = true;
@ -2791,6 +2784,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
})
};
$scope.newCardPaymentRates = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/partner_new_card_payment_rate.html',
controller: 'newCardPaymentRateDialogCtrl',
resolve: {
sys_common_rate: function () {
return $http.get('/sys/partners/sys_card_rates');
},
clientMoniker: function () {
return $scope.partner.client_moniker;
},
cost_rate_channel: function () {
return $scope.cost_rate_channel;
}
}
}).result.then(function () {
$scope.getRates();
});
};
$scope.newRate = function () {
var name = $scope.bankCtrl.rate_name;
$uibModal.open({
@ -2889,6 +2901,74 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}]);
app.controller('newCardPaymentRateDialogCtrl', ['$scope', '$http', 'sys_common_rate', 'clientMoniker', function ($scope, $http, sys_common_rate, clientMoniker) {
$scope.rate = {};
$scope.card_payment_normal = true;
$scope.card_payment_switch_title = "Direct Debit";
$scope.card_payment = [
{
type: "rpaypmt_card",
title: "Card Payment"
}, {
type: "rpaypmt_dd",
title: "Direct Debit"
}];
$scope.cardRateConfig = $scope.card_payment[0];
$scope.switchCardRateConfig = function () {
$scope.card_payment_normal = !$scope.card_payment_normal;
$scope.rate = {};
if ($scope.card_payment_normal) {
$scope.cardRateConfig = $scope.card_payment[0];
$scope.card_payment_switch_title = "Direct Debit";
}else {
$scope.cardRateConfig = $scope.card_payment[1];
$scope.card_payment_switch_title = "Card Payment";
}
};
$scope.sysRateConfig = angular.copy(sys_common_rate.data);
$scope.ctrl = {sending: false};
$scope.saveRate = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
$scope.errmsg = null;
$scope.ctrl.sending = true;
$scope.rate.type = $scope.cardRateConfig.type;
$http.post('/sys/partners/' + clientMoniker + '/rates', $scope.rate).then(function () {
$scope.ctrl.sending = false;
$scope.$close();
}, function (resp) {
$scope.ctrl.sending = false;
$scope.errmsg = resp.data.message;
})
}
$scope.changeDays = function () {
if ($scope.rate.clean_days && $scope.card_payment_normal) {
switch ($scope.rate.clean_days) {
case '1': {
$scope.rate.rate_value = parseFloat($scope.sysRateConfig.t1.domestic_rate);
$scope.rate.transaction_fee = parseFloat($scope.sysRateConfig.t1.transaction_fee);
break;
}
case '2': {
$scope.rate.rate_value = parseFloat($scope.sysRateConfig.t2.domestic_rate);
$scope.rate.transaction_fee = parseFloat($scope.sysRateConfig.t2.transaction_fee);
break;
}
case '3': {
$scope.rate.rate_value = parseFloat($scope.sysRateConfig.t3.domestic_rate);
$scope.rate.transaction_fee = parseFloat($scope.sysRateConfig.t3.transaction_fee);
break;
}
}
}
};
}]);
app.controller('newRateDialogCtrl', ['$scope', '$http', 'rate', 'sys_common_rate', 'clientMoniker', function ($scope, $http, rate, sys_common_rate, clientMoniker) {
$scope.rate = angular.copy(rate);
@ -4810,17 +4890,20 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
}]);
app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', function ($scope, $http, $uibModal, $state, commonDialog) {
app.controller('subMerchantIdApplicaitonsCtrl', ['$scope', '$http', '$uibModal', '$state', 'commonDialog', '$sce', function ($scope, $http, $uibModal, $state, commonDialog, $sce) {
$scope.loadSubMerchantInfos = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_sub_applices', {params: {}}).then(function (resp) {
$scope.subMerchantInfos = resp.data;
});
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) {
$scope.subRpayMerchantInfos = resp.data;
});
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_yeepay_sub_applices', {params: {}}).then(function (resp) {
$scope.subYeepayMerchantInfos = resp.data;
// $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_rpay_sub_applices', {params: {}}).then(function (resp) {
// $scope.subRpayMerchantInfos = resp.data;
// });
//
// $http.get('/sys/partners/' + $scope.partner.client_moniker + '/list_yeepay_sub_applices', {params: {}}).then(function (resp) {
// $scope.subYeepayMerchantInfos = resp.data;
// });
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/queryMWMerchantIdStatus').then(function (resp) {
$scope.partner.cardInfo = resp.data;
});
};
$scope.useSubMerchantId = function (sub_merchant_id) {
@ -4875,6 +4958,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadSubMerchantInfos();
})
};
$scope.applyMWSubMerchantId = function () {
commonDialog.confirm({
title: 'Apply Merchant Warrior Sub Merchant Id',
contentHtml: $sce.trustAsHtml('Are you sure to apply merchant Warrior sub merchant id for <span style="color: red">[' + $scope.partner.company_name + ']</span>?')
}).then(function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/applyMWMerchantId').then(function (res) {
commonDialog.alert({
title: 'Success',
content: 'Apply Merchant Warrior Sub Merchant ID successfully',
type: 'success'
});
$scope.partner.cardInfo = res.data;
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
})
};
$scope.applyRpaySubMerchantId = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id.html',

@ -212,17 +212,24 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button" ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a></li>
<!--<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Yeepay'}"><a role="button" ng-click="bankCtrl.rate_name='Yeepay'">Yeepay</a></li>-->
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_card'">Card Payment</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct Debit</a></li>
<button class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))" >
Add Card Payment Rates
</button>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Rate Value</th>
<th ng-if="bankCtrl.rate_name!='rpaypmt_card'">Rate Value</th>
<th ng-if="bankCtrl.rate_name=='rpaypmt_card'">Domestic Rate Value</th>
<th ng-if="bankCtrl.rate_name=='rpaypmt_card'">International Rate Value</th>
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th ng-if="bankCtrl.rate_name=='Wechat'">Clean Days</th>
<th ng-if="bankCtrl.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">Clean Days</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
@ -233,11 +240,13 @@
<tr ng-repeat="rate in rates|filter:{rate_name:bankCtrl.rate_name}:true"
ng-class="{'text-bold':rate.current,'success':rate.active}">
<td ng-bind="rate.rate_name"></td>
<td ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name!='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'" ng-bind="rate.ext_rates.overseas_rate_value + ' %'"></td>
<td ng-bind="'$ '+rate.transaction_fee"></td>
<td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td>
<td ng-if="rate.rate_name=='Wechat'">T+{{rate.clean_days}}</td>
<td ng-if="rate.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">T+{{rate.clean_days}}</td>
<td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.operator_name||'系统生成'"></td>
<td ng-bind="rate.remark|limitTo:20" title="{{rate.remark}}"></td>

@ -0,0 +1,147 @@
<div class="modal-header">
<h4>New {{cardRateConfig.title}} Rate</h4>
<a role="button" ng-click="switchCardRateConfig()"><i class="fa fa-refresh"></i>Switch {{card_payment_switch_title}} Rate Config</a>
</div>
<div class="modal-body">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
<div class="row">
<div class="col-sm-12">
<form class="form-horizontal" novalidate name="rate_form">
<div class="form-group">
<label class="control-label col-sm-4">{{cardRateConfig.title}} Clear Days</label>
<div class="col-sm-6">
<div class="input-group">
<select class="form-control" ng-model="rate.clean_days" id="cleanDays" ng-change="changeDays()">
<option value="1">T+1</option>
<option value="2">T+2</option>
<option value="3">T+3</option>
</select>
<div>{{rateConfig}}</div>
</div>
</div>
</div>
<div class="form-group" ng-if="cardRateConfig.type=='rpaypmt_card'"
ng-class="{'has-error':rate_form.domestic_rate_value.$invalid && rate_form.domestic_rate_value.$dirty}">
<label class="control-label col-sm-4" for="domestic_rate_value_input">Domestic Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="domestic_rate_value" stringToNumber2 class="form-control" ng-model="rate.rate_value"
min="0" max="5" step="0.1" id="domestic_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.domestic_rate_value.$error" ng-if="rate_form.domestic_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.0%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<div class="form-group" ng-if="cardRateConfig.type=='rpaypmt_card'"
ng-class="{'has-error':rate_form.international_rate_value.$invalid && rate_form.international_rate_value.$dirty}">
<label class="control-label col-sm-4" for="international_rate_value_input">International Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="international_rate_value" stringToNumber2 class="form-control" ng-model="rate.ext_rates.overseas_rate_value"
min="0" max="5" step="0.1" id="international_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.international_rate_value.$error" ng-if="rate_form.international_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.0%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<div class="form-group" ng-if="cardRateConfig.type=='rpaypmt_dd'"
ng-class="{'has-error':rate_form.direct_debit_rate_value.$invalid && rate_form.direct_debit_rate_value.$dirty}">
<label class="control-label col-sm-4" for="direct_debit_rate_value_input">Direct Debit Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="direct_debit_rate_value" stringToNumber2 class="form-control" ng-model="rate.rate_value"
min="0" max="5" step="0.1" id="direct_debit_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.direct_debit_rate_value.$error" ng-if="rate_form.rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.0%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- 新增transaction_fee -->
<div class="form-group" ng-if="cardRateConfig.type=='rpaypmt_card'"
ng-class="{'has-error':rate_form.transaction_fee.$invalid && rate_form.transaction_fee.$dirty}">
<label class="control-label col-sm-4" for="transaction_fee_input">Transaction Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="Transaction_fee_value" stringToNumber2 class="form-control" ng-model="rate.transaction_fee"
min="0" step="0.1" max="1" id="transaction_fee_input" required>
<div class="input-group-addon">$</div>
</div>
<div ng-messages="rate_form.transaction_fee.$error" ng-if="rate_form.transaction_fee.$dirty">
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="active_time_input">Active Date</label>
<div class="col-sm-6">
<input class="form-control" ng-model="rate.active_time" id="active_time_input"
uib-datepicker-popup size="10" placeholder="Active Date"
is-open="activeDate.open" ng-click="activeDate.open=true"
datepicker-options="{maxDate:rate.expiry_time}" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="expire_time_input">Expire Date</label>
<div class="col-sm-6">
<input class="form-control" ng-model="rate.expiry_time" id="expire_time_input"
uib-datepicker-popup size="10" placeholder="Expire Date"
is-open="expireDate.open" ng-click="expireDate.open=true"
datepicker-options="{minDate:rate.active_time}" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-4" for="remark_text">Remark</label>
<div class="col-sm-6">
<input class="form-control" ng-model="rate.remark" id="remark_text" type="text">
</div>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="saveRate(rate_form)" ng-disabled="ctrl.sending">Submit</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>

@ -154,7 +154,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -357,6 +361,8 @@
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}">
<td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td>
<td>
<img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
<img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo" ng-if="trade.channel=='Znyoo'"/>
<img src="/static/images/wechatpay_sign.png" uib-tooltip="WechatPay" ng-if="trade.channel=='Wechat'"/>
<img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay" ng-if="trade.channel=='Bestpay'"/>

@ -14,7 +14,9 @@
</div>
<div class="form-group"
ng-class="{'has-error':rate_form.rate_value.$invalid && rate_form.rate_value.$dirty}">
<label class="control-label col-sm-4" for="rate_value_input">Rate Value</label>
<label class="control-label col-sm-4" for="rate_value_input">
<span ng-if="rate.rate_name=='rpaypmt_card'">Domestic </span>
Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="rate_value" class="form-control" ng-model="rate.rate_value"
@ -22,9 +24,6 @@
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.rate_value.$error" ng-if="rate_form.rate_value.$dirty">
<!--<div class="small text-danger" ng-message="max">-->
<!--<i class="glyphicon glyphicon-alert"></i> No more than 2.2%-->
<!--</div>-->
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
@ -35,6 +34,29 @@
</div>
</div>
<div class="form-group" ng-if="rate.rate_name=='rpaypmt_card'"
ng-class="{'has-error':rate_form.international_rate_value.$invalid && rate_form.international_rate_value.$dirty}">
<label class="control-label col-sm-4" for="international_rate_value_input">International Rate Value</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="international_rate_value" stringToNumber2 class="form-control" ng-model="rate.ext_rates.overseas_rate_value"
min="0" max="5" step="0.1" id="international_rate_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_form.international_rate_value.$error" ng-if="rate_form.international_rate_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 5.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.0%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- 新增transaction_fee字段 -->
<div class="form-group"
ng-class="{'has-error':rate_form.transaction_fee.$invalid && rate_form.transaction_fee.$dirty}">
@ -46,9 +68,6 @@
<div class="input-group-addon">$</div>
</div>
<div ng-messages="rate_form.transaction_fee.$error" ng-if="rate_form.transaction_fee.$dirty">
<!--<div class="small text-danger" ng-message="max">-->
<!--<i class="glyphicon glyphicon-alert"></i> No more than 2.2%-->
<!--</div>-->
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0
</div>
@ -78,7 +97,9 @@
datepicker-options="{minDate:rate.active_time}">
</div>
</div>
<div class="form-group" ng-if="rate.rate_name=='Wechat'">
<div class="form-group" ng-if="rate.rate_name=='Wechat'
|| rate.rate_name=='rpaypmt_card'
|| rate.rate_name=='rpaypmt_dd'">
<label class="control-label col-sm-4" for="clean_days_input">Clean Days</label>
<div class="col-sm-6">
<div class="input-group">
@ -100,4 +121,4 @@
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="saveRate()" ng-disabled="ctrl.sending">Submit</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>

@ -95,127 +95,156 @@
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title pull-left">
Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}}
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="partner.temp_sub_merchant"></i>
<h3 class="box-title pull-left" >
Merchant Warrior Sub Merchant Id :
<span ng-if="partner.cardInfo.card_sub_merchant_id">
<span ng-if="partner.cardInfo.available" style="color:green;">审核通过</span>
<span ng-if="!partner.cardInfo.available && partner.cardInfo.pending" style="color:#f39c12;">审核中</span>
<span ng-if="!partner.cardInfo.available && !partner.cardInfo.pending" style="color:red;">打回</span>
({{partner.cardInfo.card_sub_merchant_id}})</span>
<span ng-if="!partner.cardInfo">未申请</span>
</h3>
<button role="button" ng-if="!partner.rpay_enterprise_id" class="btn btn-info pull-right" title="Apply Sub Merchant Id"
ng-click="applyRpaySubMerchantId()">
<button role="button" class="btn btn-info pull-right" title="Apply MW Sub Merchant Id"
ng-click="applyMWSubMerchantId()">
<i class="fa fa-plus"></i>
Apply Sub Merchant Id
Apply Merchant Warrior Sub Merchant Id
</button>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Sub Merchant Id</h3>
</div>
<div class="box-body col-sm-6" ng-repeat="id_apply in subRpayMerchantInfos">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-success">
<b>Sub Merchant Id</b>
<b style="float: right"><span
ng-if="partner.rpay_enterprise_id == id_apply.sub_merchant_id"><small
class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>
</li>
<li class="list-group-item list-group-item-success">
Apply Time
<span style="float: right" ng-bind="id_apply.create_time"></span>
</li>
<li class="list-group-item list-group-item-success">
Company Short Name
<span style="float:right;">{{id_apply.merchant_shortname | cut:true:20:' ...'}}</span>
</li>
<li class="list-group-item list-group-item-success">
Business Category
<span style="float: right">{{id_apply.business_category | partner_royalpay_industry}}</span>
</li>
<li class="list-group-item list-group-item-success">
Operator
<span style="float: right" ng-bind="id_apply.operator"></span>
</li>
</ul>
<div class="box_desk">
<div class="content_button">
<button role="button" class="btn btn-info" title="use"
ng-click="useRpaySubMerchantId(id_apply.sub_merchant_id)">
USE
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
<h3 class="box-title pull-left">
Yeepay Sub Merchant Id : {{partner.yeepay_sub_merchant_id}}
</h3>
<button role="button" class="btn btn-info pull-right" title="Apply Sub Merchant Id"
ng-click="applyYeepaySubMerchantId()">
<i class="fa fa-plus"></i>
Apply Sub Merchant Id
</button>
<button role="button" class="btn btn-success pull-right" title="Add Sub Merchant Id"
ng-click="addYeepaySubMerchantId()">
<i class="fa fa-plus"></i>
Add Sub Merchant Id
</button>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title">List of Sub Merchant Id</h3>
</div>
<div class="box-body col-sm-6" ng-repeat="id_apply in subYeepayMerchantInfos">
<ul class="list-group ui_desk">
<li class="list-group-item list-group-item-success">
<b>Sub Merchant Id</b>
<b style="float: right"><span
ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id"><small
class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>
</li>
<li class="list-group-item list-group-item-success">
Apply Time
<span style="float: right" ng-bind="id_apply.create_time"></span>
</li>
<li class="list-group-item list-group-item-success">
Business Content
<span style="float:right;">{{id_apply.business_content | yeepayBusinessContent}}</span>
</li>
<li class="list-group-item list-group-item-success">
Business Category
<span style="float: right">{{id_apply.industry | yeepayIndustry}}</span>
</li>
<li class="list-group-item list-group-item-success">
Operator
<span style="float: right" ng-bind="id_apply.operator"></span>
</li>
</ul>
<div class="box_desk">
<div class="content_button">
<button role="button" class="btn btn-info" title="use"
ng-click="useYeepaySubMerchantId(id_apply.sub_merchant_id)">
USE
</button>
<button role="button" class="btn btn-info" title="update"
ng-click="updateYeepaySubMerchantId(id_apply.sub_merchant_id)" ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id">
UPDATE
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--<div class="content">-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12">-->
<!-- <div class="box-solid">-->
<!-- <div class="box box-warning">-->
<!-- <div class="box-header">-->
<!-- <h3 class="box-title pull-left">-->
<!-- Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}}-->
<!-- <i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="partner.temp_sub_merchant"></i>-->
<!-- </h3>-->
<!-- <button role="button" ng-if="!partner.rpay_enterprise_id" class="btn btn-info pull-right" title="Apply Sub Merchant Id"-->
<!-- ng-click="applyRpaySubMerchantId()">-->
<!-- <i class="fa fa-plus"></i>-->
<!-- Apply Sub Merchant Id-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="box-header">-->
<!-- <h3 class="box-title">List of Sub Merchant Id</h3>-->
<!-- </div>-->
<!-- <div class="box-body col-sm-6" ng-repeat="id_apply in subRpayMerchantInfos">-->
<!-- <ul class="list-group ui_desk">-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- <b>Sub Merchant Id</b>-->
<!-- <b style="float: right"><span-->
<!-- ng-if="partner.rpay_enterprise_id == id_apply.sub_merchant_id"><small-->
<!-- class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Apply Time-->
<!-- <span style="float: right" ng-bind="id_apply.create_time"></span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Company Short Name-->
<!-- <span style="float:right;">{{id_apply.merchant_shortname | cut:true:20:' ...'}}</span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Business Category-->
<!-- <span style="float: right">{{id_apply.business_category | partner_royalpay_industry}}</span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Operator-->
<!-- <span style="float: right" ng-bind="id_apply.operator"></span>-->
<!-- </li>-->
<!-- </ul>-->
<!-- <div class="box_desk">-->
<!-- <div class="content_button">-->
<!-- <button role="button" class="btn btn-info" title="use"-->
<!-- ng-click="useRpaySubMerchantId(id_apply.sub_merchant_id)">-->
<!-- USE-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--<div class="content">-->
<!-- <div class="row">-->
<!-- <div class="col-sm-12">-->
<!-- <div class="box-solid">-->
<!-- <div class="box box-warning">-->
<!-- <div class="box-header">-->
<!-- <h3 class="box-title pull-left">-->
<!-- Yeepay Sub Merchant Id : {{partner.yeepay_sub_merchant_id}}-->
<!-- </h3>-->
<!-- <button role="button" class="btn btn-info pull-right" title="Apply Sub Merchant Id"-->
<!-- ng-click="applyYeepaySubMerchantId()">-->
<!-- <i class="fa fa-plus"></i>-->
<!-- Apply Sub Merchant Id-->
<!-- </button>-->
<!-- <button role="button" class="btn btn-success pull-right" title="Add Sub Merchant Id"-->
<!-- ng-click="addYeepaySubMerchantId()">-->
<!-- <i class="fa fa-plus"></i>-->
<!-- Add Sub Merchant Id-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="box">-->
<!-- <div class="box-header">-->
<!-- <h3 class="box-title">List of Sub Merchant Id</h3>-->
<!-- </div>-->
<!-- <div class="box-body col-sm-6" ng-repeat="id_apply in subYeepayMerchantInfos">-->
<!-- <ul class="list-group ui_desk">-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- <b>Sub Merchant Id</b>-->
<!-- <b style="float: right"><span-->
<!-- ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id"><small-->
<!-- class="text-red">(当前使用)</small></span>{{id_apply.sub_merchant_id}}</b>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Apply Time-->
<!-- <span style="float: right" ng-bind="id_apply.create_time"></span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Business Content-->
<!-- <span style="float:right;">{{id_apply.business_content | yeepayBusinessContent}}</span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Business Category-->
<!-- <span style="float: right">{{id_apply.industry | yeepayIndustry}}</span>-->
<!-- </li>-->
<!-- <li class="list-group-item list-group-item-success">-->
<!-- Operator-->
<!-- <span style="float: right" ng-bind="id_apply.operator"></span>-->
<!-- </li>-->
<!-- </ul>-->
<!-- <div class="box_desk">-->
<!-- <div class="content_button">-->
<!-- <button role="button" class="btn btn-info" title="use"-->
<!-- ng-click="useYeepaySubMerchantId(id_apply.sub_merchant_id)">-->
<!-- USE-->
<!-- </button>-->
<!-- <button role="button" class="btn btn-info" title="update"-->
<!-- ng-click="updateYeepaySubMerchantId(id_apply.sub_merchant_id)" ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id">-->
<!-- UPDATE-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
</div>

@ -165,7 +165,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -537,6 +541,10 @@
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png"
uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png"
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id2}}<span
ng-if="trade.source!='system' && trade.source!=null && trade.incremental_surcharge != null"><i
class="fa fa-question-circle-o" uib-tooltip-html="trade.htmlTooltip"></i></span>

@ -166,7 +166,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -384,6 +388,10 @@
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png"
uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png"
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id}}
</td>
<td>

@ -146,7 +146,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -341,6 +345,8 @@
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/>
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id}}
</td>
<td>

@ -1,3 +1,11 @@
<style>
.tradeCardInfo {
padding-left: 25%;
margin: 0;
color: gray;
}
</style>
<div class="modal-header bg-success">
<h4>Order Detail</h4>
</div>
@ -140,6 +148,19 @@
</div>
</div>
</div>
<div class="form-group" ng-if="order.channel=='rpaypmt_card' || order.channel=='rpaypmt_dd'">
<div style="text-align: center;">
<p ng-click="hidePayerCardInfo()"><label class="control-label" style="cursor: pointer;padding-right: 0;color: gray;">—————————— Payer Card Information ——————————</label></p>
</div>
<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 Type: </label> {{order.card_type}}</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>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-3">Remark</label>-->
<!--<div class="col-xs-9">-->
@ -191,4 +212,4 @@
</table>
</div>
</div>
</div>
</div>

@ -219,7 +219,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -641,6 +645,10 @@
ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay"
ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png"
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id}}<span
ng-if="trade.source!='system' && trade.source!=null && trade.incremental_surcharge != null"><i
class="fa fa-question-circle-o" uib-tooltip-html="trade.htmlTooltip"></i></span>

@ -203,7 +203,11 @@
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}"
ng-click="params.channel='RPAYPMT_DD';loadTradeLogs(1)">Direct Debit</a>
</p>
</div>
</div>
@ -486,6 +490,10 @@
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/>
<img src="/static/images/lakalapay_sign.png"
uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/>
<img src="/static/images/card_payment_sign.png"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/>
<img src="/static/images/direct_debit_sign.png"
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/>
{{trade.order_id}}<span ng-if="trade.source!='system'&& trade.source!=null && trade.incremental_surcharge != null"><i class="fa fa-question-circle-o" uib-tooltip-html="trade.htmlTooltip"></i></span>
</td>
<td>

@ -160,9 +160,9 @@ public class GatewayApplicationMerchantDemoTest {
@Test
public void updateFile() throws Exception{
String originUrl = "https://sandbox.royalpay.com.au/api/v1.0/org_gateway/partners/" + SHORTID + "/attachment/files";
String originUrl = "http://127.0.0.1:9002/attachment/secret_files";
String url = addSignUrl(originUrl, null, SPDEMOPRIKEY);
File file = new File("/Users/1/Downloads/banner_eshop.jpg");
File file = new File("/Users/luoyang/Downloads/banner_eshop.jpg");
InputStream stream = new FileInputStream(file);
HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.POST);
gen.setTimeout(10000);

Loading…
Cancel
Save