Merge branch 'alipayplus_aps' into develop

# Conflicts:
#	src/main/ui/static/payment/partner/partner-manage.js
master
Yixian 3 years ago
commit dd72942347

@ -5,7 +5,7 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.2.31</version>
<version>2.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
@ -266,7 +266,7 @@
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>192.168.0.84:5000/royalpay/serverjre:openj9</image>
<image>192.168.0.84:5000/royalpay/openjdk:11.0.8</image>
</from>
<to>
<image>192.168.0.84:5000/royalpay/manage-dev</image>
@ -304,7 +304,7 @@
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>hkccr.ccs.tencentyun.com/rpay/serverjre:openj9</image>
<image>192.168.0.84:5000/royalpay/openjdk:11.0.8</image>
</from>
<to>
<image>hkccr.ccs.tencentyun.com/cross-payment-dev/manage-dev:${project.version}
@ -339,7 +339,7 @@
<version>${jib-maven-plugin.version}</version>
<configuration>
<from>
<image>hkccr.ccs.tencentyun.com/rpay/serverjre:openj9</image>
<image>192.168.0.84:5000/royalpay/openjdk:11.0.8</image>
</from>
<to>
<image>hkccr.ccs.tencentyun.com/rpay/manage:${project.version}</image>

@ -0,0 +1,20 @@
CREATE TABLE `log_mch_alipay_aps_register` (
`request_id` varchar(50) NOT NULL,
`client_id` int(11) NOT NULL,
`pid` varchar(50) NOT NULL,
`mid` varchar(50) NOT NULL,
`store_id` varchar(50) DEFAULT NULL,
`merchant_type` varchar(20) DEFAULT NULL COMMENT ' 支付类型 ONLINE,RETAIL',
`request_time` datetime DEFAULT NULL,
`confirm_time` datetime DEFAULT NULL,
`result_code` varchar(50) DEFAULT NULL COMMENT '返回的状态码',
`result_status` varchar(10) DEFAULT NULL COMMENT '返回的状态 F, S',
`is_valid` tinyint(1) DEFAULT '1' COMMENT '记录是否有效1有效 0无效',
`registration_status` varchar(30) DEFAULT NULL,
PRIMARY KEY (`request_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='AlipayPlus商户注册记录表';
//
ALTER TABLE sys_client_legal_person add legal_representative_id varchar(50) DEFAULT NULL COMMENT '法人身份ID'

@ -38,74 +38,8 @@ orderBasic:
properties:
pay_type:
type: string
description: 钱包类型AlipayPlus 线上订单必填默认是alipay_cn
enum:
- alipay_cn
- alipay_hk
- gcash
- dana
- bkash
- kakaopay
- easy_paisa
- tng
- truemoney
flights:
type: array
description: 航班信息如果有多个航班需分开填入如果商户业务类型是航班类型且钱包类型为alipay_cn时必填
items:
type: object
properties:
flight_no:
type: string
description: 航班号
departure_time:
type: string
format: date-time
example: '202103011203'
pattern: yyyyMMddHHmm
description: 起飞时间(当地时区)
hotels:
type: array
description: 酒店预订信息如果有多个酒店则分开录入如果商户类型为旅游且钱包类型为alipay_cn时必填
items:
type: object
properties:
name:
type: string
description: 酒店名称
check_in_time:
type: string
format: date
example: '20210301'
pattern: yyyyMMdd
description: 入住日期
check_out_time:
type: string
format: date
example: '20210302'
pattern: yyyyMMdd
description: 离店日期
schools:
type: array
description: 留学信息如果存在多个则分开录入如果商户类型为留学且钱包类型为alipay_cn时必填
items:
type: object
properties:
admission_notice_url:
type: string
description: 学校AdmissionNotice网页地址
goods:
type: array
description: 商品信息如果存在多个则分开录入如果商户类型为贸易且钱包类型为alipay_cn时必填
items:
type: object
properties:
name:
type: string
description: 商品名称
quantity:
type: number
description: 数量
description: |
指定钱包类型。对于AlipayPlus线上订单如果提供具体钱包类型可直接进入对应钱包收银台否则将进入钱包选择界面让消费者选择支付。参数来源于【查询可用子渠道】
orderWithChannel:
allOf:
- $ref: '#/orderBasic'
@ -407,6 +341,58 @@ transactionItem:
remark:
type: string
description: 备注
consultPaymentRequest:
type: object
required:
- currency
- amount
- terminal_type
properties:
currency:
type: string
description: |
即将下单的币种,[ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) 标准3字母币种编码如AUD
amount:
type: integer
description: 即将下单的金额,单位是货币最小单位
terminal_type:
type: string
enum:
- WEB
- H5
- APP
description: 下单类型是PC端WEB页面还是移动端的H5页面大小写敏感
user_region:
type: string
description: |
[ISO-3166](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en) 标准双字符国家编码消费者所在国家影响推荐的钱包优先级如韩国顾客会优先返回KAKAOPAY
os_type:
type: string
description: 消费者支付场景操作系统类型通常用于APP支付场景大小写敏感
enum:
- IOS
- ANDROID
client_ip:
type: string
description: 消费者所在ip
user_agent:
type: string
description: 如果是移动端支付可提供User-Agent信息用于判断当前消费者可用的钱包
consultResultItemAlipayPlus:
type: object
required:
- sub_channel
- sub_channel_name
properties:
sub_channel:
type: string
description: 钱包名称用于作为pay_type参数传递给下单api
sub_channel_name:
type: string
description: 钱包品牌名称,用于展示
logo:
type: string
description: 钱包logo图片地址
customInfo:
type: object
properties:

@ -166,6 +166,39 @@ security:
nonce_str: []
time: []
paths:
/gateway/partners/{partner_code}/consult_payment:
post:
tags:
- ChannelGateway
- MobileH5
- SDK Payment
summary: 查询可用子渠道
description: |
用于AlipayPlus渠道查询可用子渠道。
可调用当前接口获取消费者可用的钱包列表,并展示给消费者自主选择。
parameters:
- in: path
name: partner_code
required: true
requestBody:
content:
application/json:
schema:
$ref: 'components_order.yml#/consultPaymentRequest'
responses:
200:
description: 查询结果
content:
application/json:
schema:
type: object
required:
- sub_channels
properties:
sub_channels:
type: array
items:
$ref: 'components_order.yml#/consultResultItemAlipayPlus'
/gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
tags:
@ -479,16 +512,7 @@ paths:
content:
application/json:
schema:
type: object
allOf:
- $ref: 'components_order.yml#/orderBasic'
- type: object
properties:
channel:
type: string
description: 支付渠道,大小写敏感
enum:
- Alipay
$ref: 'components_order.yml#/orderWithChannel'
responses:
200:
description: Order
@ -938,27 +962,19 @@ paths:
application/json:
schema:
allOf:
- $ref: 'components_order.yml#/orderBasic'
- $ref: 'components_order.yml#/orderWithChannel'
- type: object
required:
- channel
properties:
channel:
type: string
description: 支付渠道,大小写敏感
enum:
- Wechat
- Alipay
system:
type: string
description: 客户端操作类型,支付宝选填,微信不需要
description: 客户端操作类型Alipay选填Wechat不需要AlipayPlus必填
enum:
- android
- iphone
- ipad
version:
type: string
description: 客户端版本号,支付宝选填,微信不需要
description: 客户端版本号,Alipay选填其他渠道不需要
appid:
type: string
description: 微信必填开发者平台appid

@ -1,4 +1,3 @@
orderBasic:
required:
- description
@ -32,6 +31,16 @@ orderBasic:
or in format: digits with 'm' or 'h' tail. m=minutes, h=hours.
default is 5m. if merchants has a global configuration in our backend, it will take the configuration.
no shorter than 1m and no longer than 24h
extra:
type: object
properties:
pay_type:
type: string
description: |
Determine wallet type. For AlipayPlus orders, merchant can determine which wallet to use so that it will directly go into cashier page.
Otherwise a wallet choice page will be shown to customers to determine which wallet they want to use.
value comes from ConsultPayment API
orderWithChannel:
allOf:
- $ref: '#/orderBasic'
@ -328,6 +337,59 @@ transactionItem:
remark:
type: string
description: transaction remark
consultPaymentRequest:
type: object
required:
- currency
- amount
- terminal_type
properties:
currency:
type: string
description: |
Currency of the incoming payment. Should be 3-character code in [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html). For example, AUD
amount:
type: integer
description: Order amount of the incoming payment. Should be minimal unit of the currency.
terminal_type:
type: string
enum:
- WEB
- H5
- APP
description: Web is for pc browser paying, H5 is for mobile browser or inner webview in wallet apps. APP is for merchant's App. case-sensitive
user_region:
type: string
description: |
Standard 2-character code in [ISO-3166](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en). Which country is your customer in.
This will help to determine which wallet is suggested. For example, a South-Korea customer will be recommended to use KakaoPay
os_type:
type: string
description: For App payment. Pass this os is customer using. Case-sensitive
enum:
- IOS
- ANDROID
client_ip:
type: string
description: customer ip address
user_agent:
type: string
description: If customer is in the inner webview of wallet. this will help to determine which wallet should be recommended
consultResultItemAlipayPlus:
type: object
required:
- sub_channel
- sub_channel_name
properties:
sub_channel:
type: string
description: wallet name. should be passed as pay_type parameter in new order requests
sub_channel_name:
type: string
description: wallet brand name which can be display to customers
logo:
type: string
description: wallet logo
customInfo:
type: object
properties:

@ -161,7 +161,7 @@ tags:
Call this api to create order and get param string for SDK calling. Call SDK api with the param to start payment and get payment result from Wechat app *It is strongly advised to request RoyalPay order query Api to confirm that the order has been paid in order to cancelling order by system at the same time.*
<img src="img/sdk_wechat_api_payment_en.png">
More information for integration with Alipay: [Alipay SDK Document](https://global.alipay.com/doc/app/intro)
More information for integration with Alipay: [Wechat SDK Document](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=11_1)
More information for integration with Wechat: [Wechat SDK Document](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=11_1)
[Alipay SDK for Android](resources/api/alipaySdk-20160825.jar)
[Alipay SDK for iOS](resources/api/AlipaySDKForiOS.zip)
[Wechat SDK for Android](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419319167&token=&lang=zh_CN)
@ -174,6 +174,39 @@ security:
nonce_str: []
time: []
paths:
/gateway/partners/{partner_code}/consult_payment:
post:
tags:
- ChannelGateway
- MobileH5
- SDK Payment
summary: ConsultPayment
description: |
Used for check which pay_type is available for AlipayPlus channel.
You can call this api to get available wallets and ask customers to choose.
parameters:
- in: path
name: partner_code
required: true
requestBody:
content:
application/json:
schema:
$ref: 'components_order.yml#/consultPaymentRequest'
responses:
200:
description: 查询结果
content:
application/json:
schema:
type: object
required:
- sub_channels
properties:
sub_channels:
type: array
items:
$ref: 'components_order.yml#/consultResultItemAlipayPlus'
/gateway/partners/{partner_code}/orders/{partner_order_id}:
put:
tags:
@ -489,16 +522,7 @@ paths:
content:
application/json:
schema:
type: object
allOf:
- $ref: 'components_order.yml#/orderBasic'
- type: object
properties:
channel:
type: string
description: channel. case sensitive
enum:
- Alipay
$ref: 'components_order.yml#/orderWithChannel'
responses:
200:
description: Order
@ -960,30 +984,22 @@ paths:
application/json:
schema:
allOf:
- $ref: 'components_order.yml#/orderBasic'
- $ref: 'components_order.yml#/orderWithChannel'
- type: object
required:
- channel
properties:
channel:
type: string
description: Payment channel, required, case sensitive
enum:
- Wechat
- Alipay
system:
type: string
description: OS type of client app, optional for Alipay, not required for Wechat
description: OS type of client app, optional for Alipay, required for AlipayPlus, not required for Wechat
enum:
- android
- iphone
- ipad
version:
type: string
description: client app version, optional for Alipay, not required for Wechat
description: client app version, optional only for Alipay
appid:
type: string
description: wechat appid, required for Wechat, not required for Alipay
description: wechat appid, only required for Wechat
responses:
200:
description: Order

@ -4,6 +4,7 @@ import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.core.TransactionService;
import au.com.royalpay.payment.core.beans.PaymentQueryResult;
import au.com.royalpay.payment.core.beans.PreOrderRequest;
import au.com.royalpay.payment.core.beans.TransactionBizSubType;
import au.com.royalpay.payment.core.beans.coupon.CashCouponInfo;
import au.com.royalpay.payment.core.beans.coupon.CouponInfo;
import au.com.royalpay.payment.core.events.PaymentFinishedEvent;
@ -163,7 +164,7 @@ public class OneDollarDayActivitySupportImpl implements OneDollarDayActivity, Pa
log.put("transaction_time", format.format(paymentQueryResult.getPayTime()));
log.put("clearing_status", 0);
log.put("remark", "Activity: Day Of One Dollar");
transactionService.saveTransaction(log);
transactionService.saveTransaction(log, TransactionBizSubType.COUPON_PAY);
String transactionId = log.getString("transaction_id");
actDietOrderMapper.setTransactionId(orderId, transactionId, log.getDate("transaction_time"));
}
@ -214,7 +215,7 @@ public class OneDollarDayActivitySupportImpl implements OneDollarDayActivity, Pa
log.put("transaction_time", new Date());
log.put("clearing_status", 0);
log.put("remark", "Activity Refund: Day Of One Dollar");
transactionService.saveTransaction(log);
transactionService.saveTransaction(log,TransactionBizSubType.COUPON_REFUND);
actDietOrderMapper.updateRefund(orderId, log.getString("transaction_id"), log.getDate("transaction_time"));
}

@ -10,10 +10,9 @@ public interface PlatformClearService {
JSONObject getChannelSettleLog(String channel);
void verifySettleLogByDate(String start_date, String end_date, String channel) throws ParseException;
void verifySettleLogByDate(String startDate, String endDate, String channel) throws ParseException;
void generateSettleLogs();
void generateAliPaySettleLogs();
}

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.analysis.core.impls;
import au.com.royalpay.payment.core.mappers.MchChannelContractMapper;
import au.com.royalpay.payment.manage.analysis.core.ChannelsAnalysisService;
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
import com.alibaba.fastjson.JSONObject;
@ -28,6 +29,9 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
@Resource
private CustomerAndOrdersStatisticsMapper customerAndOrdersStatisticsMapper;
@Resource
private MchChannelContractMapper mchChannelContractMapper;
@Override
public List<JSONObject> getChannelMount(JSONObject params) {
/*if (!params.containsKey("client_ids") && !params.containsKey("org_id")){
@ -37,6 +41,8 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
listChannel.add(putParam(params,"Wechat"));
listChannel.add(putParam(params,"Alipay"));
listChannel.add(putParam(params,"AlipayOnline"));
listChannel.add(putParam(params,"ApsInStore"));
listChannel.add(putParam(params,"ApsCashier"));
listChannel.add(putParam(params,"Rpay"));
listChannel.add(putParam(params,"rpaypmt_card"));
listChannel.add(putParam(params,"rpaypmt_dd"));
@ -50,7 +56,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
}
List<JSONObject> list = new ArrayList<>();
Map<Date,JSONObject> analysisMap = new TreeMap<>();
String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd"};
String[] channels = {"Wechat","Alipay","AlipayOnline","Rpay","rpaypmt_card","rpaypmt_dd","ApsCashier","ApsInStore"};
for (String channel:channels){
analysisChannelCustomers(params, analysisMap, channel);
}
@ -76,7 +82,7 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
@Override
public void exportData(JSONObject params, HttpServletResponse resp) {
params.put("channels", new String []{"Alipay", "AlipayOnline"});
params.put("channels", new String []{"Alipay", "AlipayOnline","AlipayAps"});
String[] title = {"Channel", "Total Amount(AUD)", "Total orders", "Transaction Partners", "Enable Partners"};
JSONObject count = customerAndOrdersStatisticsMapper.countChannel(params);
int enablePartners = customerAndOrdersStatisticsMapper.countEnableAlipay(params);
@ -136,7 +142,14 @@ public class ChannelsAnalysisServiceImpl implements ChannelsAnalysisService {
params.put("gateway_alipay_online", 1);
enablePartners = customerAndOrdersStatisticsMapper.countEnableChannel(params);
params.remove("gateway_alipay_online");
} else {
}
else if("ApsInStore".equals(name)){
enablePartners=mchChannelContractMapper.sumEnablePartners(name);
}
else if("ApsCashier".equals(name)){
enablePartners=mchChannelContractMapper.sumEnablePartners(name);
}
else {
params.put("enable_" + name.toLowerCase(), 1);
enablePartners = customerAndOrdersStatisticsMapper.countEnableChannel(params);
params.remove("enable_" + name.toLowerCase());

@ -621,7 +621,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
}
}
private JSONObject getTodayChannelCount(JSONObject params){
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd"};
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd","ApsInStore","ApsCashier"};
JSONObject resp = new JSONObject();
for(String channel:channels) {
params.put("channel", channel);

@ -3,7 +3,7 @@ package au.com.royalpay.payment.manage.analysis.core.impls;
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;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SettlementLog;
import au.com.royalpay.payment.core.beans.SettlementLog;
import au.com.royalpay.payment.manage.analysis.core.EstimateAnalysisService;
import au.com.royalpay.payment.manage.analysis.core.EstimateCacheSupport;
import au.com.royalpay.payment.manage.analysis.mappers.EstimateAnalysisMapper;

@ -1,34 +1,30 @@
package au.com.royalpay.payment.manage.analysis.core.impls;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient;
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;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SettlementLog;
import au.com.royalpay.payment.core.exceptions.ChannelNetworkException;
import au.com.royalpay.payment.core.ChannelSettleVerify;
import au.com.royalpay.payment.core.beans.SettlementLog;
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
import au.com.royalpay.payment.manage.analysis.mappers.EstimateAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.log.PlatformSettlementMapper;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.defines.PayChannel;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.utils.PageListUtils;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Service
public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
@ -37,16 +33,10 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
public static final SimpleDateFormat sdfClear = new SimpleDateFormat("yyyy-MM-dd");
public static final SimpleDateFormat sdfNormal = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Resource
private MpPaymentApi mpPaymentApi;
@Resource
private AlipayClient alipayClient;
@Autowired(required = false)
private ChannelSettleVerify[] channelSettleVerifys;
@Resource
private PlatformSettlementMapper platformSettlementMapper;
@Resource
private EstimateAnalysisMapper estimateAnalysisMapper;
@Resource
private AttachmentClient attachmentClient;
@Override
public JSONObject getPlatformSettleLog(String channel, int page, int limit) {
@ -58,10 +48,11 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
@Override
public JSONObject getChannelSettleLog(String channel) {
JSONObject sysLogs = new JSONObject();
JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog5("2018-04-05 02:00:00", sdfNormal.format(new Date()), channel, "Credit");
Date fromDate = DateTime.parse("2018-04-05T02:00:00+10:00").toDate();
JSONObject creditLogs = platformSettlementMapper.calculateChannelSysSettleLog(fromDate, new Date(), channel, "Credit");
sysLogs.put("sys_pay_fee", creditLogs.getBigDecimal("rmb_amount"));
JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog5("2018-04-05 02:00:00", sdfNormal.format(new Date()), channel, "Debit");
JSONObject debitLogs = platformSettlementMapper.calculateChannelSysSettleLog(fromDate, new Date(), channel, "Debit");
sysLogs.put("sys_refund_fee", debitLogs.getBigDecimal("rmb_amount"));
sysLogs.put("surcharge", creditLogs.getBigDecimal("charge_amount").subtract(debitLogs.getBigDecimal("charge_amount")));
@ -74,121 +65,41 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
}
@Override
public void verifySettleLogByDate(String start_date, String end_date, String channel) {
if (StringUtils.equals("Alipay", channel)) {
try {
doVerifyAlipaySettleLog(sdfClear.parse(end_date));
} catch (Exception e) {
logger.error("PlatformClearAnalysisServiceImpl.verifySettleLogByDate ==> 校验" + end_date + "支付宝到账失败:", e);
}
}
if (StringUtils.equals("AlipayOnline", channel)) {
try {
doVerifyAlipayOnlineSettleLog(sdfClear.parse(end_date));
} catch (Exception e) {
logger.error("PlatformClearAnalysisServiceImpl.verifySettleLogByDate ==> 校验" + end_date + "支付宝Online到账失败", e);
throw new ChannelNetworkException("校验失败:", e);
}
}
if (StringUtils.equals("Wechat", channel)) {
try {
Map<String, Date> settleDate = new HashMap<>();
settleDate.put("from", sdfClear.parse(start_date));
settleDate.put("to", sdfClear.parse(end_date));
doVerifyWechatSettleLog(settleDate);
} catch (Exception e) {
logger.error("PlatformClearAnalysisServiceImpl.verifySettleLogByDate ==> 校验" + end_date + "微信到账失败:", e);
}
}
}
@Override
// @Transactional
public void generateSettleLogs() {
// deleteSettleLogs();
generateWechatSettleLogs();
generateAlipaySettleLogs();
generateAlipayOnlineSettleLogs();
}
@Override
@Transactional
public void generateAliPaySettleLogs() {
generateAlipaySettleLogs();
generateAlipayOnlineSettleLogs();
}
@Transactional
public void generateWechatSettleLogs() {
try {
Map<String, Date> settleDate = TimeZoneUtils.getStatetimeDays();
logger.info("开始查询" + settleDate.get("from") + "到" + settleDate.get("to") + "的微信清算记录");
doVerifyWechatSettleLog(settleDate);
} catch (ParseException e) {
e.printStackTrace();
public void verifySettleLogByDate(String startDate, String endDate, String channel) {
if (channelSettleVerifys == null) {
return;
}
}
private void generateAlipaySettleLogs() {
try {
List<Date> dateList = TimeZoneUtils.getStatetime();
for (Date dateStr : dateList) {
try {
doVerifyAlipaySettleLog(dateStr);
} catch (Exception e) {
logger.error("获取" + dateStr + "Alipay清算记录失败", e);
}
}
} catch (Exception e) {
logger.error("获取Alipay清算记录时间失败", e);
}
}
private void generateAlipayOnlineSettleLogs() {
try {
List<Date> dateList = TimeZoneUtils.getStatetime();
for (Date dateStr : dateList) {
try {
doVerifyAlipayOnlineSettleLog(dateStr);
} catch (Exception e) {
logger.error("获取" + dateStr + "AlipayOnline清算记录失败", e);
}
}
} catch (Exception e) {
logger.error("获取AlipayOnline清算记录时间失败", e);
}
}
@Transactional
public void doVerifyAlipaySettleLog(Date dateStr) throws Exception {
JSONObject aliSettleLog = alipayClient.oldDownloadRetailSettlements(dateStr);
saveAlipaySettleLog(dateStr, aliSettleLog, "Alipay");
}
Arrays.stream(channelSettleVerifys).filter(verify -> verify.payChannel().getChannelCode().equalsIgnoreCase(channel))
.findFirst().ifPresent(verify -> {
try {
Date currentDate = sdfClear.parse(startDate);
Date end = sdfClear.parse(endDate);
while (!end.before(currentDate)) {
saveVerifyResults(currentDate, verify);
currentDate = DateUtils.addDays(currentDate, 1);
}
} catch (ParseException e) {
throw new BadRequestException("Invalid Date Format");
}
@Transactional
public void doVerifyAlipayOnlineSettleLog(Date dateStr) throws Exception {
JSONObject aliOnlineSettleLog = alipayClient.downloadOnlineSettlements(dateStr);
saveAlipaySettleLog(dateStr, aliOnlineSettleLog, "AlipayOnline");
});
}
private void saveAlipaySettleLog(Date dateStr, JSONObject aliSettleLog, String channel) throws Exception {
if (aliSettleLog != null) {
JSONObject settleFee = getAliSettle(aliSettleLog);
private void saveVerifyResults(Date date, ChannelSettleVerify verify) {
logger.info("starting verify for channel {} on {}", verify.payChannel(), date);
List<SettlementLog> logs = verify.verifyResults(date);
logger.info("loaded {} settle logs for channel {} on {}", logs.size(), verify.payChannel(), date);
for (SettlementLog settle : logs) {
JSONObject params = new JSONObject();
params.put("settle_date", dateStr);
params.put("start_date", dateStr);
params.put("end_date", dateStr);
params.put("pay_fee", settleFee.getBigDecimal("credit"));
params.put("refund_fee", settleFee.getBigDecimal("debit"));
params.put("net_fee", settleFee.getBigDecimal("net_fee"));
params.put("surcharge", settleFee.getBigDecimal("surcharge"));
params.put("settlement_fee", settleFee.getBigDecimal("settlement_fee"));
params.put("channel", channel);
params.put("settle_date", settle.getSettlementDate());
params.put("start_date", TimeZoneUtils.formatTime(settle.getStart(), TimeZoneUtils.PATTERN_NORMAL, "Asia/Shanghai"));
params.put("end_date", TimeZoneUtils.formatTime(settle.getEnd(), TimeZoneUtils.PATTERN_NORMAL, "Asia/Shanghai"));
if (verify.payChannel() == PayChannel.WECHAT) {
params.put("settle_date", TimeZoneUtils.formatTime(settle.getSettlementDate(), TimeZoneUtils.PATTERN_NORMAL, "Asia/Shanghai"));
}
params.put("channel", verify.payChannel().getChannelCode());
params.put("last_update_date", new Date());
JSONObject sysClearData = getSystemClearingAmount(dateStr, aliSettleLog, channel);
JSONObject sysClearData = getSystemClearingAmount(settle, verify.payChannel().getChannelCode());
if (sysClearData != null && !sysClearData.isEmpty()) {
params.put("sys_pay_fee", sysClearData.getBigDecimal("sys_pay_fee"));
params.put("sys_refund_fee", sysClearData.getBigDecimal("sys_refund_fee"));
@ -196,173 +107,74 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
params.put("sys_surcharge", sysClearData.getBigDecimal("sys_surcharge"));
params.put("sys_settlement_fee", sysClearData.getBigDecimal("sys_settle_fee"));
}
JSONObject check = platformSettlementMapper.findByDateMerchant(sdfClear.format(dateStr), channel, "All");
if (check != null) {
params.put("log_id", check.getString("log_id"));
platformSettlementMapper.update(params);
} else {
platformSettlementMapper.save(params);
params.put("merchants", settle.getMerchantId());
params.put("pay_fee", settle.getPayFee());
params.put("refund_fee", settle.getRefundFee());
params.put("net_fee", settle.getPayNetFee());
if (verify.payChannel() != PayChannel.WECHAT) {
params.put("net_fee", settle.getPayFee().subtract(settle.getRefundFee()));
}
}
}
public void doVerifyWechatSettleLog(Map<String, Date> settleDate) {
List<SettlementLog> tencentSettle = new ArrayList<>();
for (WeChatPayConfig.Merchant mch : WechatPayEnvironment.getEnv().getWechatMerchantConfigs()) {
params.put("settlement_fee", settle.getSettlementFee());
params.put("surcharge", settle.getPoundageFee());
params.put("unsettle_fee", settle.getUnsettlementFee());
try {
tencentSettle = mpPaymentApi.settlementLogs(settleDate.get("from"), settleDate.get("to"), mch.getMerchantId());
if (tencentSettle == null) {
logger.info("【" + mch.getMerchantId() + "】下没有清算记录");
if (("1500474722".equals(settle.getMerchantId()) && settle.getSettlementDate().before(DateTime.parse("2018-06-02").toDate())) ||
("1492874492".equals(settle.getMerchantId()) && settle.getSettlementDate().after(DateTime.parse("2018-06-05").toDate()))) {
return;
}
JSONObject check = platformSettlementMapper.findByDateMerchant(verify.payChannel() == PayChannel.WECHAT ? TimeZoneUtils.formatTime(settle.getSettlementDate(), TimeZoneUtils.PATTERN_NORMAL, "Asia/Shanghai") : sdfClear.format(settle.getSettlementDate()), verify.payChannel().getChannelCode(), settle.getMerchantId());
if (check != null) {
params.put("log_id", check.getString("log_id"));
platformSettlementMapper.update(params);
} else {
for (SettlementLog settle : tencentSettle) {
JSONObject params = new JSONObject();
params.put("settle_date", settle.getSettlementDate());
params.put("start_date", settle.getStart());
params.put("end_date", settle.getEnd());
params.put("channel", "Wechat");
params.put("last_update_date", new Date());
JSONObject sysClearData = getSystemClearingAmount(null, settle, "Wechat");
if (sysClearData != null && !sysClearData.isEmpty()) {
params.put("sys_pay_fee", sysClearData.getBigDecimal("sys_pay_fee"));
params.put("sys_refund_fee", sysClearData.getBigDecimal("sys_refund_fee"));
params.put("sys_net_fee", sysClearData.getBigDecimal("sys_net_fee"));
params.put("sys_surcharge", sysClearData.getBigDecimal("sys_surcharge"));
params.put("sys_settlement_fee", sysClearData.getBigDecimal("sys_settle_fee"));
}
params.put("merchants", mch.getMerchantId());
params.put("pay_fee", settle.getPayFee());
params.put("refund_fee", settle.getRefundFee());
params.put("net_fee", settle.getPayNetFee());
params.put("settlement_fee", settle.getSettlementFee());
params.put("surcharge", settle.getPoundageFee());
params.put("unsettle_fee", settle.getUnsettlementFee());
JSONObject check = platformSettlementMapper.findByDateMerchant(sdfClear.format(settle.getSettlementDate()), "Wechat",
mch.getMerchantId());
if (check != null) {
params.put("log_id", check.getString("log_id"));
platformSettlementMapper.update(params);
} else {
platformSettlementMapper.save(params);
}
params.clear();
logger.info(mch.getMerchantId() + "的微信清算记录查询完成");
}
platformSettlementMapper.save(params);
}
params.clear();
} catch (Exception e) {
logger.error("【" + mch.getMerchantId() + "】下没有清算记录", e);
logger.error(e.getMessage(), e);
}
}
}
public JSONObject getAliSettle(JSONObject aliSettleLog) {
JSONObject alipaySettleLog = new JSONObject();
JSONArray payments = aliSettleLog.getJSONArray("payments");
BigDecimal credit = BigDecimal.ZERO;
BigDecimal creditFee = BigDecimal.ZERO;
BigDecimal creditSettle = BigDecimal.ZERO;
if (payments != null) {
for (int i = 0; i < payments.size(); i++) {
JSONObject json = payments.getJSONObject(i);
BigDecimal transactionAmount = json.getBigDecimal("transaction_amount");
BigDecimal chargeFee = json.getBigDecimal("charge_fee");
credit = credit.add(transactionAmount);
creditFee = creditFee.add(chargeFee);
if (json.containsKey("settle_amount")) {
creditSettle = creditSettle.add(json.getBigDecimal("settle_amount"));
} else {
creditSettle = creditSettle.add(transactionAmount.subtract(chargeFee));
@Override
// @Transactional
public void generateSettleLogs() {
if (channelSettleVerifys != null) {
try {
List<Date> dateList = TimeZoneUtils.getStatetime();
for (Date date : dateList) {
for (ChannelSettleVerify verify : channelSettleVerifys) {
try {
saveVerifyResults(date, verify);
} catch (Exception e) {
logger.error("[{}]{} failed to download settle file", date, verify.payChannel(), e);
}
}
}
} catch (ParseException ignored) {
}
}
alipaySettleLog.put("credit", credit);
JSONArray refunds = aliSettleLog.getJSONArray("refunds");
logger.info("alipay的refunds清算总信息" + refunds.toJSONString());
BigDecimal debit = BigDecimal.ZERO;
BigDecimal debitFee = BigDecimal.ZERO;
BigDecimal debitSettle = BigDecimal.ZERO;
for (int i = 0; i < refunds.size(); i++) {
JSONObject json = refunds.getJSONObject(i);
BigDecimal transactionAmount = json.getBigDecimal("transaction_amount");
BigDecimal chargeFee = json.getBigDecimal("charge_fee");
debit = debit.add(transactionAmount);
debitFee = debitFee.add(chargeFee);
if (json.containsKey("settle_amount")) {
debitSettle = debitSettle.add(json.getBigDecimal("settle_amount"));
} else {
debitSettle = debitSettle.add(transactionAmount.subtract(chargeFee));
}
}
alipaySettleLog.put("debit", debit);
alipaySettleLog.put("net_fee", credit.subtract(debit));
alipaySettleLog.put("surcharge", creditFee.subtract(debitFee));
alipaySettleLog.put("settlement_fee", creditSettle.subtract(debitSettle));
logger.info("阿里清算日志:" + alipaySettleLog.toJSONString());
return alipaySettleLog;
}
public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00");
private JSONObject getSystemClearingAmount(SettlementLog settlementLog, String channel) {
JSONObject sysLogs = new JSONObject();
String start_date = null;
String end_date = null;
if (StringUtils.equals("Alipay", channel)) {
JSONObject lastClearDay = estimateAnalysisMapper.findLastCleanDays(sdfClear.format(settle_date), 1);
start_date = sdf.format(lastClearDay.getDate("date_str"));
end_date = sdf.format(settle_date);
logger.info("Alipay System Settle Logs:" + start_date + "<====>" + end_date);
} else if (StringUtils.equals("Wechat", channel)) {
SettlementLog wechatSettleLog = (SettlementLog) settlementLog;
start_date = sdf.format(wechatSettleLog.getStart());
end_date = sdf.format(wechatSettleLog.getEnd());
logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date);
} else if (StringUtils.equals("AlipayOnline", channel)) {
JSONObject alipayOnlineSettleLog = (JSONObject) settlementLog;
logger.info("AlipayOnline System Settle Logs:" + alipayOnlineSettleLog.getDate("min_time") + "<====>" + alipayOnlineSettleLog.getDate("max_time"));
start_date = sdf.format(alipayOnlineSettleLog.getDate("min_time"));
end_date = sdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_time"), 1));
} else {
return null;
}
// 2017-11-01后微信手续费0.5
BigDecimal wechat_rate;
if (end_date.compareTo("2017-11-01 03:00:00") <= 0) {
wechat_rate = new BigDecimal("0.006");
} else {
wechat_rate = new BigDecimal("0.005");
}
// 2018-09-01后Alipay_Online手续费0.006
BigDecimal alipay_online_rate;
if (end_date.compareTo("2018-09-01 02:00:00") <= 0) {
alipay_online_rate = new BigDecimal("0.018");
} else {
alipay_online_rate = new BigDecimal("0.006");
}
logger.info("{} System Settle Logs:{}<====>{}", channel, settlementLog.getStart(), settlementLog.getEnd());
try {
JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog(start_date, end_date, channel, "Credit", wechat_rate);
JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog(settlementLog.getStart(), settlementLog.getEnd(), settlementLog.getMerchantId(), channel, "Credit");
sysLogs.put("sys_pay_fee", creditLogs.getBigDecimal("aud_amount"));
JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog(start_date, end_date, channel, "Debit", wechat_rate);
JSONObject debitLogs = platformSettlementMapper.calculateSysSettleLog(settlementLog.getStart(), settlementLog.getEnd(), settlementLog.getMerchantId(), channel, "Debit");
sysLogs.put("sys_refund_fee", debitLogs.getBigDecimal("aud_amount"));
sysLogs.put("sys_net_fee", creditLogs.getBigDecimal("aud_amount").subtract(debitLogs.getBigDecimal("aud_amount")));
if (StringUtils.equals("Alipay", channel)) {
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, BigDecimal.valueOf(0.006)));
} else if (StringUtils.equals("AlipayOnline", channel)) {
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, alipay_online_rate));
} else {
sysLogs.put("sys_surcharge", creditLogs.getBigDecimal("charge_amount").subtract(debitLogs.getBigDecimal("charge_amount")));
}
sysLogs.put("sys_surcharge", creditLogs.getBigDecimal("charge_amount").subtract(debitLogs.getBigDecimal("charge_amount")));
sysLogs.put("sys_settle_fee", sysLogs.getBigDecimal("sys_net_fee").subtract(sysLogs.getBigDecimal("sys_surcharge")));
logger.info("calculated system result[{}|{}~{}]:{}", channel, settlementLog.getStart(), settlementLog.getEnd(), sysLogs);
return sysLogs;
} catch (Exception e) {
// do nothing
e.printStackTrace();
//do nothing
logger.error("Error caught on analysising {}", channel, e);
}
return null;
}

@ -985,11 +985,13 @@ public class RetailAppServiceImp implements RetailAppService {
for (JSONObject order : orders) {
order.put("geek_apply_deduction", order.getBooleanValue("geek_apply_deduction"));
Calendar calendar = (Calendar) order.get("transaction_time");
if (timezone != null) {
String tradeDate=null;
String tradeTime=null;
if (calendar!=null&&timezone != null) {
calendar.setTimeZone(TimeZone.getTimeZone(timezone));
tradeDate = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone());
tradeTime = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone());
}
String tradeDate = DateFormatUtils.format(calendar, "yyyy-MM-dd", calendar.getTimeZone());
String tradeTime = DateFormatUtils.format(calendar, "HH:mm:ss", calendar.getTimeZone());
order.put("trade_date", tradeDate);
order.put("trade_time", tradeTime);
// todo
@ -999,6 +1001,12 @@ public class RetailAppServiceImp implements RetailAppService {
if ("CNY".equals(order.getString("currency"))) {
order.put("clearing_amount", order.getBigDecimal("total_amount"));
}
if("ApsInStore".equalsIgnoreCase(order.getString("channel"))){
order.put("channel", "Alipay+");
}
if("ApsCashier".equalsIgnoreCase(order.getString("channel"))){
order.put("channel", "Alipay+(Online)");
}
if (!dateContains.contains(tradeDate)) {
String reDate = tradeDate.replace("-", "");
AppQueryBean dateQuery = new AppQueryBean();
@ -3114,6 +3122,18 @@ public class RetailAppServiceImp implements RetailAppService {
if (cardPaymentPay.containsKey("channel")) {
channels.add(cardPaymentPay);
}
JSONObject apsInStore = getChannel(clientId, now, "ApsInStore");
if (apsInStore.containsKey("channel")) {
apsInStore.put("channel","Alipay+");
channels.add(apsInStore);
}
JSONObject apsCashier = getChannel(clientId, now, "ApsCashier");
if (apsCashier.containsKey("channel")) {
apsCashier.put("channel","Alipay+(Online)");
channels.add(apsCashier);
}
res.put("channels", channels);
if (res.containsKey("rate_value")) {
BigDecimal minRate = res.getBigDecimal("rate_value").add(BigDecimal.valueOf(0.01)).setScale(2, RoundingMode.DOWN);

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.citypartner.core.impls;
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
import au.com.royalpay.payment.channels.alipay.runtime.alipayplus.AlipayPlusRuleManager;
import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis;
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis;
import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis;
@ -8,6 +10,8 @@ import au.com.royalpay.payment.manage.mappers.financial.*;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.defines.PayChannel;
import au.com.royalpay.payment.tools.defines.TradeType;
import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
@ -357,6 +361,11 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal wechatChargeRate = new BigDecimal("0.6");
BigDecimal jdChargeRate = new BigDecimal("0.9");
BigDecimal alipayonlineChargeRate = new BigDecimal("0.6");
BigDecimal retailInterchangeChargeRate = new BigDecimal("0.5");
BigDecimal retailServiceChargeRate = new BigDecimal("0.5");
BigDecimal onlineInterchangeChargeRate = new BigDecimal("0.5");
BigDecimal onlineServiceChargeRate = new BigDecimal("0.5");
if (sysConfig.getBigDecimal("Alipay_charge_rate") != null) {
alipayChargeRate = sysConfig.getBigDecimal("Alipay_charge_rate");
}
@ -369,11 +378,28 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
if (sysConfig.getBigDecimal("alipayonline_charge_rate") != null) {
alipayonlineChargeRate = sysConfig.getBigDecimal("alipayonline_charge_rate");
}
if (sysConfig.getBigDecimal("retail_interchange_charge_rate") != null) {
retailInterchangeChargeRate = sysConfig.getBigDecimal("retail_interchange_charge_rate");
}
if (sysConfig.getBigDecimal("retail_service_charge_rate") != null) {
retailServiceChargeRate = sysConfig.getBigDecimal("retail_service_charge_rate");
}
if (sysConfig.getBigDecimal("online_interchange_charge_rate") != null) {
onlineInterchangeChargeRate = sysConfig.getBigDecimal("online_interchange_charge_rate");
}
if (sysConfig.getBigDecimal("online_service_charge_rate") != null) {
onlineServiceChargeRate = sysConfig.getBigDecimal("online_service_charge_rate");
}
JSONObject channelCharge = new JSONObject();
channelCharge.put("alipayChargeRate", alipayChargeRate);
channelCharge.put("wechatChargeRate", wechatChargeRate);
channelCharge.put("jdChargeRate", jdChargeRate);
channelCharge.put("alipayonlineChargeRate", alipayonlineChargeRate);
channelCharge.put("retailInterchangeChargeRate", retailInterchangeChargeRate);
channelCharge.put("retailServiceChargeRate", retailServiceChargeRate);
channelCharge.put("onlineInterchangeChargeRate", onlineInterchangeChargeRate);
channelCharge.put("onlineServiceChargeRate", onlineServiceChargeRate);
List<JSONObject> transactionDetail = transactionMapper.listTransactionForCityPartnerCommissionByDate(year, month);
transactionDetail.forEach(item -> {
@ -451,13 +477,28 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
if (orgInfo.get("alipayonlinecn_rate_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
}
} else if (StringUtils.equals(channel.toLowerCase(), "apsinstore")) {
if (orgInfo.get("retail_interchange_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Retail)的 Interchange Fee 成本手续费未设置");
}
if (orgInfo.get("retail_service_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Retail)的 Service Fee 成本手续费未设置");
}
} else if (StringUtils.equals(channel.toLowerCase(), "apscashier")) {
if (orgInfo.get("online_interchange_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Online)的 Interchange Fee 成本手续费未设置");
}
if (orgInfo.get("online_service_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Online)的 Service Fee 成本手续费未设置");
}
} else {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
}
}
PayChannel payChannel = PayChannel.fromChannelCode(channel);
for (JSONObject params : oneChannel.getValue()) {
if (StringUtils.equals("rpaypmt_card", channel.toLowerCase())) {
if (payChannel == PayChannel.RPAY_CHANNEL_CARD) {
//rpaypmt_domestic_card
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("rpaypmt_domestic_card" + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
@ -489,7 +530,22 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} else {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal channelRate = null;
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
//增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO);
@ -514,7 +570,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("total_charge", total_surage);
json.put("transaction_fee", transaction_fee);
json.put("net_charge", net_surage);
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
json.put("org_rate", (orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))));
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
json.put("org_rate", (orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))));
} else {
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
}
json.put("royalpay_charge", royalpay_surage);
json.put("org_charge", org_charge.signum() < 0 ? new BigDecimal(0) : org_charge);
json.put("commission_type", "1");
@ -539,7 +601,21 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
String channel = oneChannel.getKey();
for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal channelRate;
if (StringUtils.equals("alipayaps", channel.toLowerCase())) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
AlipayConfig.BizType bizType = AlipayPlusRuleManager.getRules().determineAmsBizType(TradeType.fromGatewayNumber(params.getInteger("gateway")));
if (bizType == AlipayConfig.BizType.RETAIL) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
//增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO);
@ -565,7 +641,11 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("gross_amount", total);
json.put("total_charge", total_surage);
json.put("net_charge", net_surage);
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
if (StringUtils.equals("alipayaps", channel.toLowerCase())) {
json.put("org_rate", (orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))));
} else {
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
}
json.put("partner_charge", royalpay_surage);
json.put("share_charge", share_surage);
json.put("org_charge", org_charge);
@ -611,6 +691,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
rateChannel);
} catch (Exception e) {
}
PayChannel payChannel = PayChannel.fromChannelCode(channel);
for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
if (StringUtils.equals(channel.toLowerCase() + "_rate_value", "rpaypmt_card_rate_value")) {
@ -659,7 +740,22 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} else {
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal channelRate;
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge")
.subtract(params.getBigDecimal("surcharge_cashback"))
.subtract(params.getBigDecimal("transaction_fee"));
@ -705,7 +801,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
}
json.put("gross_amount", total);
json.put("total_charge", total_surage);
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
json.put("org_rate", (orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))));
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
json.put("org_rate", (orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))));
} else {
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
}
json.put("royalpay_charge", royalpay_surage);
if (type == 1) {
json.put("net_charge", net_surage);

@ -220,7 +220,7 @@ public class TestController {
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
// first, second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");

@ -1,7 +1,7 @@
package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SettlementLog;
import au.com.royalpay.payment.core.beans.SettlementLog;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import org.apache.commons.lang3.time.DateUtils;

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.fund.core.impls;
import au.com.royalpay.payment.core.SettlementDetailCalculator;
import au.com.royalpay.payment.core.TransactionService;
import au.com.royalpay.payment.core.beans.TransactionBizSubType;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.fund.beans.XPlanFundConfig;
import au.com.royalpay.payment.manage.fund.core.XPlanFundConfigService;
@ -303,7 +304,7 @@ public class XPlanFundProcessorImpl implements XPlanFundProcesor {
tradeTransaction.put("channel", "System");
tradeTransaction.put("system_generate", 1);
tradeTransaction.put("remark", remark);
transactionService.saveTransaction(tradeTransaction);
transactionService.saveTransaction(tradeTransaction, TransactionBizSubType.DEPOSIT);
return tradeTransaction;
}

@ -100,7 +100,7 @@ public interface CleanService {
List<JSONObject> findLogSettleByDate(Date date);
JSONObject validTransactions(Date date, boolean fix, boolean b, boolean b1);
JSONObject validTransactions(Date date, boolean fix, boolean b, boolean b1,boolean isSendMessage);
void distributeBank(Date date, int clearingId, JSONObject bankDistribution);

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.management.clearing.core.impl;
import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.beans.OrderValidationChannelResult;
import au.com.royalpay.payment.core.beans.OrderValidationResult;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
@ -1577,7 +1578,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
}
@Override
public JSONObject validTransactions(Date dt, boolean fix, boolean b, boolean b1) {
public JSONObject validTransactions(Date dt, boolean fix, boolean b, boolean b1, boolean isSendMessage) {
if (!b) {
JSONObject reportItem = validationLogMapper.findByDate(dt);
if (reportItem != null) {
@ -1591,6 +1592,22 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
log.put("result", report.getReport().toJSONString());
validationLogMapper.removeByDate(dt);
validationLogMapper.save(log);
// 是否发送消息通知
if (isSendMessage) {
List<JSONObject> developers = managerMapper.listDetailsByRole(null, ManagerRole.DEVELOPER.getMask());
List<OrderValidationChannelResult> channelResults = report.getChannelResults();
boolean valid = channelResults.stream().map(OrderValidationChannelResult::isSuccess).reduce(Boolean::logicalAnd).orElse(true);
StringBuilder statusString = new StringBuilder("订单校对已完成,状态:" + (valid ? "🌤️【成功】" : "🌨️【失败】"));
statusString.append("\r\n");
for (OrderValidationChannelResult info : channelResults) {
if (info.isSuccess()) {
continue;
}
statusString.append(info.getChannel().getChannelCode()).append(": [ ").append(info.isSuccess() ? "成功" : "失败")
.append(StringUtils.defaultIfBlank(info.getErrorMsg(), "")).append(" ]").append("\r\n");
}
publisher.publishEvent(new TaskFinishNotifyEvent(this, PlatformEnvironment.getEnv().getCompany() + " 订单校对", statusString.toString(), developers, valid));
}
return JSON.parseObject(log.getString("result"));
}

@ -59,10 +59,11 @@ public class FinancialController {
@GetMapping("/order_validations/{date}")
public JSONObject getCheckReport(@PathVariable String date, @RequestParam(defaultValue = "false") boolean fix,
@RequestParam(name = "use_cache", defaultValue = "true") boolean useCache) {
@RequestParam(name = "use_cache", defaultValue = "true") boolean useCache,
@RequestParam(name = "is_send_message", defaultValue = "false") boolean isSendMessage) {
try {
Date dt = DateUtils.parseDate(date, new String[]{"yyyyMMdd"});
return cleanService.validTransactions(dt, fix, !useCache, false);
return cleanService.validTransactions(dt, fix, !useCache, false,isSendMessage);
} catch (ParseException e) {
throw new ParamInvalidException("date", "error.payment.valid.invalid_date_format");
}
@ -97,8 +98,8 @@ public class FinancialController {
@GetMapping("/get/transaction/status/{transactionId}")
public TransactionStatus getTransactionStatus(@PathVariable String transactionId) {
if(transactionId.isEmpty()){
throw new ParamInvalidException("date","Transaction flow is empty");
if (transactionId.isEmpty()) {
throw new ParamInvalidException("date", "Transaction flow is empty");
}
return cleanService.getTransactionStatus(transactionId);
}
@ -109,12 +110,11 @@ public class FinancialController {
@RequestParam(value = "noCache") boolean noCache,
@RequestParam(value = "billType", required = false) String billType,
@RequestParam(value = "channel") String channel,
HttpServletResponse response) {
HttpServletResponse response) {
ChannelReconciliationFileContent file = cleanService.downloadChannelReconciliationFile(pid, au.com.royalpay.payment.tools.utils.DateUtils.parseDate(billDate)
, noCache, channel, billType);
try (InputStream in = new ByteArrayInputStream(file.content())) {
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(file.name(), Charsets.UTF_8.name()));
response.setContentLength(file.length());

@ -32,12 +32,14 @@ public interface PlatformSettlementMapper {
PageList<JSONObject> findSettleLogsAllMerchant(@Param("channel") String channel, PageBounds pageBounds);
JSONObject calculateSysSettleLog(@Param("start_date") String start_date, @Param("end_date") String end_date, @Param("channel") String channel, @Param("transaction_type") String type, @Param("wechat_rate") BigDecimal wechat_rate);
JSONObject calculateSysSettleLog(@Param("start_date") Date startDate, @Param("end_date") Date endDate, @Param("channel") String channel,
@Param("pid") String pid, @Param("transaction_type") String type);
JSONObject calculateSysSettleLog5(@Param("start_date") String start_date, @Param("end_date") String end_date, @Param("channel") String channel, @Param("transaction_type") String type);
BigDecimal calculateRmbCharge(@Param("start_date") String start_date, @Param("end_date") String end_date, @Param("channel") String channel,@Param("ali_rate") BigDecimal ali_rate);
BigDecimal calculateRmbCharge(@Param("start_date") Date start_date, @Param("end_date") Date end_date, @Param("channel") String channel);
@AutoSql(SqlType.DELETE)
void delete(JSONObject params);
JSONObject calculateChannelSysSettleLog(@Param("start_date") Date startDate, @Param("end_date") Date endDate, @Param("channel") String channel,
@Param("transaction_type") String type);
}

@ -0,0 +1,20 @@
package au.com.royalpay.payment.manage.mappers.system.aps;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
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 org.apache.ibatis.annotations.Param;
@AutoMapper(tablename = "sys_client_aps_config", pkName = "id")
public interface ApsConfigMapper {
@AutoSql(SqlType.SELECT)
ApsConfigData findByClientId(@Param("client_id") String clientId);
@AutoSql(SqlType.INSERT)
void saveApsConfigClientId(ApsConfigData apsConfigData);
void updateApsConfigClientId(JSONObject apsConfigData);
}

@ -68,6 +68,8 @@ public class ClientRegisterInfo {
private String representativeEmail;
@JSONField(name = "legal_representative_job")
private String representativeJobTitle;
@JSONField(name = "legal_representative_id")
private String representativeId;
@JSONField(name = "marketing_person")
private String marketingPerson;
@JSONField(name = "marketing_phone")
@ -690,4 +692,12 @@ public class ClientRegisterInfo {
public void setMccode(String mc_code) {
this.mc_code = mc_code;
}
public String getRepresentativeId() {
return representativeId;
}
public void setRepresentativeId(String representativeId) {
this.representativeId = representativeId;
}
}

@ -0,0 +1,13 @@
package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
public interface ApsConfigService {
ApsConfigData getApsConfigByClientId(String clientId);
ApsConfigData saveApsConfigClientId(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor);
ApsConfigData updateApsConfigClientId(String managerId,String clientId, JSONObject apsConfig);
}

@ -1,7 +1,9 @@
package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.core.beans.ChannelMerchantInfo;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
@ -604,4 +606,11 @@ public interface ClientManager {
void selectBillCodeVersion(JSONObject manager, String clientMoniker, String version);
MerchantApplicationResult alipayPlusRegisterMerchant(String clientMoniker, ApsMerchantApplication apsMerchantApplication, JSONObject manager);//alipayplus 注册商户
String queryAlipayPlusOnlineStatus(boolean isOffline,String clientMoniker, JSONObject manager);
String queryAlipayPlusOfflineStatus(String clientMoniker, JSONObject manager);
}

@ -0,0 +1,38 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.manage.mappers.system.aps.ApsConfigMapper;
import au.com.royalpay.payment.manage.merchants.core.ApsConfigService;
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class ApsConfigServiceImpl implements ApsConfigService {
@Resource
private ApsConfigMapper apsConfigMapper;
@Override
public ApsConfigData getApsConfigByClientId(String clientId) {
return apsConfigMapper.findByClientId(clientId);
}
@Override
public ApsConfigData saveApsConfigClientId(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor) {
ApsConfigData apsConfigData = ApsConfigData.saveData(managerId, clientId, apsConfigDescriptor);
apsConfigMapper.saveApsConfigClientId(apsConfigData);
return apsConfigMapper.findByClientId(clientId);
}
@Override
public ApsConfigData updateApsConfigClientId(String managerId, String clientId, JSONObject apsConfig) {
apsConfig.put("clientId", clientId);
apsConfig.put("modifier", managerId);
apsConfigMapper.updateApsConfigClientId(apsConfig);
return apsConfigMapper.findByClientId(clientId);
}
}

@ -1,9 +1,12 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.channels.alipay.beans.plus.AlipayPlusRegisterResult;
import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication;
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayOnlineApi;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayRetailApi;
import au.com.royalpay.payment.channels.alipay.runtime.alipayplus.AlipayApsMerchantRegister;
import au.com.royalpay.payment.channels.alipay.runtime.entity.AlipayMerchantEntity;
import au.com.royalpay.payment.channels.rpay.runtime.beans.SubRpayMerchantInfo;
import au.com.royalpay.payment.channels.rpay.runtime.impls.RPayMerchantRegister;
@ -55,13 +58,12 @@ import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMap
import au.com.royalpay.payment.manage.mappers.risk.RiskAttentionMerchantsMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.merchants.beans.*;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientInfoCacheSupport;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.core.*;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBank;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBankClientNullException;
import au.com.royalpay.payment.manage.merchants.core.bank.AustraliaBankInfo;
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import au.com.royalpay.payment.manage.merchants.entity.impls.*;
import au.com.royalpay.payment.manage.merchants.enums.UPayAuthFileEnum;
import au.com.royalpay.payment.manage.notice.core.MailService;
@ -113,6 +115,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.alipay.global.api.model.aps.ProductCodeType;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
@ -280,10 +283,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private MailGunService mailGunService;
@Resource
private ClearingDetailMapper clearingDetailMapper;
@Resource
private ClearingLogMapper clearingLogMapper;
@Resource
private ClientConfigMapper clientConfigMapper;
@Resource
private PermissionPartnerManagerImpl permissionPartnerManagerImpl;
@ -328,7 +327,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private PaymentApi paymentApi;
@Resource
private MerchantChannelPermissionManager merchantChannelPermissionManager;
private ApsConfigService apsConfigService;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@ -356,7 +355,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private String agreetemplatePdfPath;
@Value("${app.agreetemplate.aggregate.path}")
private String aggregateAgreetemplatePdfPath;
// private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
// private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2020/04/08/1586313342533_41vI3w9R8OHrhAVYWvdv7S2IyQra4z.pdf";
private final String IMG_AGGREGATE_FILE = "https://file.royalpay.com.au/open/2021/09/07/1630997571126_fqWcLQ5Rx0wFm8pVwpKuI1gjf6FmwX.pdf";
@ -554,7 +553,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
resolver.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) {
client.put("enable_alipayplus", true);
}
client.put("enable_alipayaps", false);
MerchantChannelPermissionResolver resolverApsInStore = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()).getChannelPermissionResolver();
MerchantChannelPermissionResolver resolverApsCashier = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_CASHIER.getChannelCode()).getChannelPermissionResolver();
if(!Objects.isNull(resolverApsInStore) && !Objects.isNull(resolverApsCashier) &&
(resolverApsInStore.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()) ||
resolverApsCashier.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()))){
client.put("enable_alipayaps", true);
}
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
if (apsConfig == null) {
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor());
}
client.put("aps_config_id", apsConfig.getId());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
return client;
}
@ -934,6 +946,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject representativeInfo = new JSONObject();
representativeInfo.put("client_id", clientId);
representativeInfo.put("representative_person", info.getRepresentativePerson());
representativeInfo.put("legal_representative_id", info.getRepresentativeId());
representativeInfo.put("phone", info.getRepresentativePhone());
representativeInfo.put("email", info.getRepresentativeEmail());
representativeInfo.put("job_title", info.getRepresentativeJobTitle());
@ -1577,17 +1590,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) {
PayChannel payChannel = PayChannel.fromChannelCode(channel);
if(payChannel == PayChannel.ALIPAY_APS){
ArrayList<String> apsChannels = new ArrayList<>();
apsChannels.add(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode());
apsChannels.add(PayChannel.ALIPAY_APS_CASHIER.getChannelCode());
apsChannels.forEach(apsChannel->{
extracted(manager, clientMoniker, apsChannel, allow);
});
}else {
extracted(manager, clientMoniker, channel, allow);
}
}
private void extracted(JSONObject manager, String clientMoniker, String channel, boolean allow) {
for (PaymentChannelApi channelApi : paymentApi.channels()) {
if (channelApi.channel().equalsIgnoreCase(channel)) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new NotFoundException("Client Not Exists");
}
merchantChannelPermissionManager.switchMerchantChannelPermission(channelApi.getMetadata().payChannel(), client.getIntValue("client_id"), allow);
try {
clientModifySupport.processModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow));
clientModifySupport.processModify(new SwitchChannelPermissionModify(manager, clientMoniker, merchantInfoProvider, channelApi.getChannelPermissionResolver(), allow));
} catch (Exception e) {
logger.error("Failed to change channel switch:{}", channel);
logger.error("Failed to change channel switch:{}", channel,e);
}
logger.info("{}({}) switched client {} channel {} to {}", manager.getString("display_name"), manager.getString("manager_id"), clientMoniker, channel, allow);
if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) {
@ -2004,12 +2030,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkAddRate(config, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate");
checkAddRate(config, "AlipayAps Retail Interchange Fee", "retail_interchange_fee_value", org, "min_retail_interchange_fee_rate");
checkAddRate(config, "AlipayAps Retail Serivce Fee", "retail_service_fee_value", org, "min_retail_service_fee_rate");
checkAddRate(config, "AlipayAps Online Interchange Fee", "online_interchange_fee_value", org, "min_online_interchange_fee_rate");
checkAddRate(config, "AlipayAps Online Serivce Fee", "online_service_fee_value", org, "min_online_service_fee_rate");
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
configNewClientRate(config, clientId, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate");
configNewClientRate(config, clientId, "ApsInStore", "retail_interchange_fee_value", null, "");
configNewClientRate(config, clientId, "ApsCashier", "online_interchange_fee_value", null, "");
addAlipayPlusRateConfig(config, clientId, PayChannel.ALIPAY_PLUS.getChannelCode());
}
@ -2050,12 +2082,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} else {
List<JSONObject> existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel);
existRate.stream().filter(existConfig -> {
if (existConfig.getDate("active_time").equals(config.getDate("active_time")) && existConfig.getDate("expiry_time").equals(config.getDate("expiry_time"))) {
return false;
}
return true;
}
)
if (existConfig.getDate("active_time").equals(config.getDate("active_time")) && existConfig.getDate("expiry_time").equals(config.getDate("expiry_time"))) {
return false;
}
return true;
}
)
.forEach((rateLog) -> {
rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1));
clientRateMapper.updateConfig(rateLog);
@ -2065,6 +2097,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) {
clientRateMapper.saveRate(newConfig);
}
} else if ("ApsInStore".equalsIgnoreCase(channel)) {
newConfig.put("transaction_fee", newConfig.getFloatValue("retail_service_fee_value"));
clientRateMapper.saveRate(newConfig);
} else if ("ApsCashier".equalsIgnoreCase(channel)) {
newConfig.put("transaction_fee", newConfig.getFloatValue("online_service_fee_value"));
clientRateMapper.saveRate(newConfig);
} else {
clientRateMapper.saveRate(newConfig);
}
@ -2130,7 +2168,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (config.containsKey(rateKey)) {
if (org.containsKey(rateValueKey)) {
if (config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0) {
throw new ForbiddenException("费率参数小于旗下商户最低" + channel + "费率,请重新输入");
}
}
@ -2494,7 +2531,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject client = clientDetail(manager, clientMoniker);
try {
JSONObject qrboardConfig = new JSONObject();
qrboardConfig.put("src", PlatformEnvironment.getEnv().concatUrl("/static/images/aggregate_qr_board.png"));
qrboardConfig.put("src", PlatformEnvironment.getEnv().concatUrl("/static/images/aggretage_aps_board.jpg"));
qrboardConfig.put("type", "royalpay");
qrboardConfig.put("x", "835");
qrboardConfig.put("y", "1290");
@ -2980,24 +3017,24 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("The Partner's Rate is not config!");
}
client.put("wechat_rate", weChatRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+"+weChatRate.getString("clean_days"));
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
} else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
} else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
}
try {
JSONObject alipayRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Alipay");
@ -3116,19 +3153,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("wechat_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
client.put("clean", "T+" + p.getString("clean_days"));
client.put("clean_days", p.getString("clean_days"));
if("1".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(p.getString("clean_days"))){
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
if ("1".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
} else if ("2".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
} else if ("3".equalsIgnoreCase(p.getString("clean_days"))) {
client.put("clean_1", p.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
}
} else if ("Alipay".equals(rate_name)) {
client.put("alipay_rate", p.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN));
@ -3205,21 +3242,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
} else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
} else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
}
try {
@ -4106,21 +4143,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("clean", "T+" + weChatRate.getString("clean_days"));
client.put("clean_days", weChatRate.getString("clean_days"));
client.put("located_country", "Australia");
if("1".equalsIgnoreCase(weChatRate.getString("clean_days"))){
if ("1".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
// clean_1 clean_1_friday clean_1_saturday
// second, third or fourth
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
}else if("2".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
}else if("3".equalsIgnoreCase(weChatRate.getString("clean_days"))){
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "first");
client.put("clean_1_saturday", "second");
} else if ("2".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "second");
client.put("clean_1_saturday", "third");
} else if ("3".equalsIgnoreCase(weChatRate.getString("clean_days"))) {
client.put("clean_1", weChatRate.getString("clean_days"));
client.put("clean_1_friday", "third");
client.put("clean_1_saturday", "fourth");
}
String rateConfig = sysConfigManager.getSysConfig().getString("sys_rates");
JSONObject sysConfigRate = JSON.parseObject(rateConfig);
@ -4201,7 +4238,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
logs.forEach(log -> log.put("padding", log.getBooleanValue("editable")));
JSONObject result = PageListUtils.buildPageListResult(logs);
result.put("padding", logs.stream().anyMatch(log->log.getBooleanValue("editable")));
result.put("padding", logs.stream().anyMatch(log -> log.getBooleanValue("editable")));
logger.info("##editable{}", result.getBooleanValue("padding"));
return result;
}
@ -7066,6 +7103,57 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
/**
* alipayplus(aps)
*
* @param clientMoniker
* @param apsMerchantApplication
* @param manager
* @return
*/
@Override
public MerchantApplicationResult alipayPlusRegisterMerchant(String clientMoniker, ApsMerchantApplication apsMerchantApplication, JSONObject manager) {
logger.info("====>getWebsiteType:" + apsMerchantApplication.getWebsiteType());
logger.info("====>getProductCodes:" + apsMerchantApplication.getProductCodes().toString());
boolean offline = apsMerchantApplication.getProductCodes().stream().allMatch(s -> s.equalsIgnoreCase(ProductCodeType.IN_STORE_PAYMENT.toString()));
logger.info("====>offline:" + offline);
if (offline) {
apsMerchantApplication.setPid(AlipayEnvironment.getEnv().getAlipayPlusApsRetailConfig().getPid());
} else {
apsMerchantApplication.setPid(AlipayEnvironment.getEnv().getAlipayPlusApsOnlineConfig().getPid());
}
apsMerchantApplication.setRegion("AU");
JSONObject client = sysClientMapper.findClientByMoniker(clientMoniker);
AlipayApsMerchantRegister alipayApsMerchantRegister = Optional.ofNullable(merchantChannelApplicationManager.getRegister(AlipayApsMerchantRegister.class)).orElseThrow(() -> new ServerErrorException("No AlipayAps registry found"));
MerchantApplicationResult result = alipayApsMerchantRegister.apply(client, apsMerchantApplication, manager);
return result;
}
@Override
public String queryAlipayPlusOnlineStatus(boolean isRetail, String clientMoniker, JSONObject manager) {
JSONObject client = sysClientMapper.findClientByMoniker(clientMoniker);
client.put("isRetail", isRetail);
String pid = "";
if (isRetail) {
//todo 测试需要 先都改成线上,上线此处需要改成线下
pid = AlipayEnvironment.getEnv().getAlipayPlusApsRetailConfig().getPid();
} else {
pid = AlipayEnvironment.getEnv().getAlipayPlusApsOnlineConfig().getPid();
}
client.put("pid", pid);
AlipayApsMerchantRegister alipayApsMerchantRegister = Optional.ofNullable(merchantChannelApplicationManager.getRegister(AlipayApsMerchantRegister.class)).orElseThrow(() -> new ServerErrorException("No AlipayAps registry found"));
AlipayPlusRegisterResult alipayPlusRegisterResult = alipayApsMerchantRegister.findMerchant(client);
return alipayPlusRegisterResult.getRawResponse();
}
@Override
public String queryAlipayPlusOfflineStatus(String clientMoniker, JSONObject manager) {
return null;
}
private void exportLetterOfferPDF(String clientMoniker, JSONObject manage) {
JSONObject info = convertClientLetterOfferInfo(clientMoniker);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf";
@ -7261,6 +7349,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
representativeInfo.put("postcode", partner.getString("registered_postcode"));
representativeInfo.put("state", partner.getString("registered_state"));
representativeInfo.put("legal_representative_wechatid", partner.getString("legal_representative_wechatid"));
representativeInfo.put("legal_representative_id", partner.getString("legal_representative_id"));
representativeInfo.put("marketing_person", partner.getString("marketing_person"));
representativeInfo.put("marketing_phone", partner.getString("marketing_phone"));
representativeInfo.put("marketing_email", partner.getString("marketing_email"));

@ -0,0 +1,15 @@
package au.com.royalpay.payment.manage.merchants.deacriptor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ApsConfigDescriptor {
private Boolean alipayCnSwitch = false;
}

@ -0,0 +1,44 @@
package au.com.royalpay.payment.manage.merchants.entity;
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ApsConfigData implements Serializable {
private String id;
private String creator;
private Date createTime;
private String modifier;
private Date modifyTime;
private String clientId;
private Boolean enableAlipayAps;
private Boolean alipayCnSwitch;
public static ApsConfigData saveData(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor) {
return new ApsConfigData()
.setClientId(clientId)
.setId(UUID.randomUUID().toString().replace("-", ""))
.setAlipayCnSwitch(apsConfigDescriptor.getAlipayCnSwitch())
.setCreator(managerId)
.setCreateTime(new Date());
}
}

@ -0,0 +1,37 @@
package au.com.royalpay.payment.manage.merchants.entity.impls;
import au.com.royalpay.payment.manage.merchants.entity.ClientModifyOperation;
import au.com.royalpay.payment.tools.merchants.core.MerchantChannelPermissionResolver;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.utils.JsonUtils;
import com.alibaba.fastjson.JSONObject;
import java.util.function.Consumer;
public class SwitchChannelPermissionModify extends ClientModifyOperation {
private final MerchantInfoProvider mchInfoProvider;
private final MerchantChannelPermissionResolver channelResolver;
private final boolean enableFlag;
public SwitchChannelPermissionModify(JSONObject account, String clientMoniker, MerchantInfoProvider mchInfoProvider, MerchantChannelPermissionResolver channelResolver, boolean enableFlag) {
super(account, clientMoniker);
this.mchInfoProvider = mchInfoProvider;
this.channelResolver = channelResolver;
this.enableFlag = enableFlag;
}
@Override
protected String business() {
return (enableFlag ? "开启 " : "关闭 ") + "渠道[" + channelResolver.payChannel().getChannelCode() + "]";
}
@Override
protected JSONObject getModifyResult() {
return JsonUtils.newJson(json -> json.put("enable_" + channelResolver.payChannel().getChannelCode(), enableFlag + ""));
}
@Override
protected Consumer<JSONObject> getModifyProcess() {
return client -> channelResolver.switchPermission(mchInfoProvider, client.getIntValue("client_id"), enableFlag);
}
}

@ -0,0 +1,55 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.merchants.core.ApsConfigService;
import au.com.royalpay.payment.manage.merchants.deacriptor.ApsConfigDescriptor;
import au.com.royalpay.payment.manage.merchants.entity.ApsConfigData;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/sys/partners/aps")
public class ApsConfigController {
@Resource
private ApsConfigService apsConfigService;
/**
* aps
*
* @param clientId
* @return
*/
@GetMapping("/{clientId}")
public ApsConfigData getApsConfigByClientId(@PathVariable("clientId") String clientId) {
return apsConfigService.getApsConfigByClientId(clientId);
}
/**
* aps
*
* @param clientId
* @param apsConfigDescriptor
* @return
*/
@ManagerMapping(value = "/{clientId}", method = RequestMethod.POST, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SITE_MANAGER})
public ApsConfigData saveApsConfigClientId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable("clientId") String clientId, @RequestBody ApsConfigDescriptor apsConfigDescriptor) {
return apsConfigService.saveApsConfigClientId(manager.getString("managerId"), clientId, apsConfigDescriptor);
}
/**
* aps
*
* @param clientId
* @param apsConfig
* @return
*/
@ManagerMapping(value = "/{clientId}", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SITE_MANAGER})
public ApsConfigData updateApsConfigClientId(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable("clientId") String clientId, @RequestBody JSONObject apsConfig) {
return apsConfigService.updateApsConfigClientId(manager.getString("managerId"), clientId, apsConfig);
}
}

@ -1,7 +1,9 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.channels.alipay.beans.plus.ApsMerchantApplication;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.core.beans.ChannelMerchantInfo;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
import au.com.royalpay.payment.manage.merchants.beans.*;
@ -129,8 +131,10 @@ public class PartnerManageController {
HttpServletResponse response) throws IOException {
response.setContentType("application/octet-stream;");
response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg");
OutputStream ous = response.getOutputStream();
clientManager.writeAggregateQrCodeBoard(manager, clientMoniker, config, ous, "PC");
try(OutputStream ous = response.getOutputStream()) {
clientManager.writeAggregateQrCodeBoard(manager, clientMoniker, config, ous, "PC");
ous.flush();
}
}
@ManagerMapping(value = "/{clientMoniker}/qrcode_board/CBBankAggregate", method = RequestMethod.GET)
@ -1057,4 +1061,34 @@ public class PartnerManageController {
clientManager.modifyUPayProfile(manager, clientMoniker, pass.getString("key"), pass.getBooleanValue("allow"));
}
/**
* alipayplus
* @param clientMoniker
* @param manager
* @return
*/
@ManagerMapping(value = "/{clientMoniker}/apply_alipayplus", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject applyAlipayPlusMerchant(@PathVariable String clientMoniker, @RequestBody ApsMerchantApplication apsMerchantApplication, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
MerchantApplicationResult result= clientManager.alipayPlusRegisterMerchant(clientMoniker,apsMerchantApplication,manager);
JSONObject jsonObject=new JSONObject();
if(result.isSuccess()){
jsonObject.put("result",true);
}else{
jsonObject.put("result",false);
}
return jsonObject;
}
@ManagerMapping(value = "/{clientMoniker}/query/alipay_aps_online", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject queryAlipayApsOnlineStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject result = new JSONObject();
result.put("response_str", clientManager.queryAlipayPlusOnlineStatus(false,clientMoniker, manager));
return result;
}
@ManagerMapping(value = "/{clientMoniker}/query/alipay_aps_retail", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public JSONObject queryAlipayApsOfflineStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject result = new JSONObject();
result.put("response_str", clientManager.queryAlipayPlusOnlineStatus(true,clientMoniker, manager));
return result;
}
}

@ -31,7 +31,7 @@ public class OrgInfo {
private Double alipayonline_rate_value;
private Double alipayplus_rate_value;
private Double cb_bankpay_rate_value;
// private Double rpaypmt_card_rate_value;
// private Double rpaypmt_card_rate_value;
//卡支付-国内卡费率配置
private Double rpaypmt_domestic_card_rate_value;
//卡支付-国际卡费率配置
@ -57,6 +57,14 @@ public class OrgInfo {
private Double min_rpaypmt_dd_rate;
private String state;
private String senior_parent_org_id;
private Double retail_interchange_fee_value;
private Double min_retail_interchange_fee_value;
private Double retail_service_fee_value;
private Double min_retail_service_fee_value;
private Double online_interchange_fee_value;
private Double min_online_interchange_fee_value;
private Double online_service_fee_value;
private Double min_online_service_fee_value;
public JSONObject toJsonParam() {
@ -328,6 +336,7 @@ public class OrgInfo {
public void setState(String state) {
this.state = state;
}
public String getSenior_parent_org_id() {
return senior_parent_org_id;
}
@ -417,4 +426,67 @@ public class OrgInfo {
this.min_rpaypmt_overseas_card_rate = min_rpaypmt_overseas_card_rate;
}
public Double getRetail_interchange_fee_value() {
return retail_interchange_fee_value;
}
public void setRetail_interchange_fee_value(Double retail_interchange_fee_value) {
this.retail_interchange_fee_value = retail_interchange_fee_value;
}
public Double getMin_retail_interchange_fee_value() {
return min_retail_interchange_fee_value;
}
public void setMin_retail_interchange_fee_value(Double min_retail_interchange_fee_value) {
this.min_retail_interchange_fee_value = min_retail_interchange_fee_value;
}
public Double getRetail_service_fee_value() {
return retail_service_fee_value;
}
public void setRetail_service_fee_value(Double retail_service_fee_value) {
this.retail_service_fee_value = retail_service_fee_value;
}
public Double getMin_retail_service_fee_value() {
return min_retail_service_fee_value;
}
public void setMin_retail_service_fee_value(Double min_retail_service_fee_value) {
this.min_retail_service_fee_value = min_retail_service_fee_value;
}
public Double getOnline_interchange_fee_value() {
return online_interchange_fee_value;
}
public void setOnline_interchange_fee_value(Double online_interchange_fee_value) {
this.online_interchange_fee_value = online_interchange_fee_value;
}
public Double getMin_online_interchange_fee_value() {
return min_online_interchange_fee_value;
}
public void setMin_online_interchange_fee_value(Double min_online_interchange_fee_value) {
this.min_online_interchange_fee_value = min_online_interchange_fee_value;
}
public Double getOnline_service_fee_value() {
return online_service_fee_value;
}
public void setOnline_service_fee_value(Double online_service_fee_value) {
this.online_service_fee_value = online_service_fee_value;
}
public Double getMin_online_service_fee_value() {
return min_online_service_fee_value;
}
public void setMin_online_service_fee_value(Double min_online_service_fee_value) {
this.min_online_service_fee_value = min_online_service_fee_value;
}
}

@ -4,6 +4,7 @@ import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.TransactionService;
import au.com.royalpay.payment.core.beans.PaymentQueryResult;
import au.com.royalpay.payment.core.beans.PreOrderRequest;
import au.com.royalpay.payment.core.beans.TransactionBizSubType;
import au.com.royalpay.payment.core.beans.coupon.CouponInfo;
import au.com.royalpay.payment.core.events.PaymentFinishedEvent;
import au.com.royalpay.payment.core.events.RefundSendEvent;
@ -66,6 +67,7 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
private PmtOrderMapper pmtOrderMapper;
@Resource
private TransactionService transactionService;
@Override
public String processorId() {
return COUPON_ID + "_USE";
@ -102,11 +104,11 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
return;
}
JSONObject couponAccuessLog = new JSONObject();
couponAccuessLog.put("client_id",order.getIntValue("client_id"));
couponAccuessLog.put("customer_openid","创建订单时无");
couponAccuessLog.put("creation_date",new Date());
couponAccuessLog.put("order_id",order.getString("order_id"));
couponAccuessLog.put("coupon_id","CTRIP_"+tmpEle.getString("ctrip_coupon_id"));
couponAccuessLog.put("client_id", order.getIntValue("client_id"));
couponAccuessLog.put("customer_openid", "创建订单时无");
couponAccuessLog.put("creation_date", new Date());
couponAccuessLog.put("order_id", order.getString("order_id"));
couponAccuessLog.put("coupon_id", "CTRIP_" + tmpEle.getString("ctrip_coupon_id"));
BigDecimal currentDiscount = paymentInfo.getDiscount();
//携程满减
if (StringUtils.equals(couponInfo.getString("type"), "31")) {
@ -178,13 +180,13 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
useCoupontrans.put("clearing_status", 0);
useCoupontrans.put("system_generate", 1);
useCoupontrans.put("remark", "Ctrip Coupon from Customer:" + couponLogId);
accuessCouponLog = payCouponAccuessLogMapper.findAccuessLogByOrderId(orderId,new PageBounds(Order.formString("last_update_date.desc"))).get(0);
accuessCouponLog = payCouponAccuessLogMapper.findAccuessLogByOrderId(orderId, new PageBounds(Order.formString("last_update_date.desc"))).get(0);
if (accuessCouponLog != null) {
transactionService.saveTransaction(useCoupontrans);
transactionService.saveTransaction(useCoupontrans, TransactionBizSubType.COUPON_PAY);
accuessCouponLog.put("is_valid", 1);
accuessCouponLog.put("last_update_date", new Date());
accuessCouponLog.put("transaction_id", useCoupontrans.getString("transaction_id"));
accuessCouponLog.put("customer_openid",order.getString("customer_id"));
accuessCouponLog.put("customer_openid", order.getString("customer_id"));
payCouponAccuessLogMapper.update(accuessCouponLog);
}
@ -221,7 +223,7 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
trans.put("transaction_time", new Date());
trans.put("remark", "Refund for Customer Ctrip Coupon:" + coupon_id);
logger.info("正在退款的券的信息" + trans.toJSONString());
transactionService.saveTransaction(trans);
transactionService.saveTransaction(trans, TransactionBizSubType.COUPON_REFUND);
logger.error("订单[" + orderId + "]发送全额退款,携程优惠券【" + coupon_id + "】转为Debit");
accuessCouponLog.put("transaction_refund_id", trans.getString("transaction_id"));
accuessCouponLog.put("refund_id", refundOrder.getString("refund_id"));
@ -238,7 +240,7 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
}
// 使用券的信息
private JSONObject getPreOrderCoupon(String couponLogId,int clientId) {
private JSONObject getPreOrderCoupon(String couponLogId, int clientId) {
JSONObject client = merchantInfoProvider.getClientInfo(clientId);
String timestamp = System.currentTimeMillis() + "";
String base = CUSTOMER_APP_ID + timestamp + CUSTOMER_AUTH_CODE;

@ -15,7 +15,6 @@ import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskMaterialMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskOrdersMapper;
import au.com.royalpay.payment.manage.mappers.system.*;
import au.com.royalpay.payment.manage.notice.core.MailService;
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskMaterialService;
@ -143,8 +142,6 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
private final Map<String, AppMsgSender> senderMap = new HashMap<>();
@Resource
private APNSMessageHelper apnsMessageHelper;
@Resource
private CardSecureService cardSecureService;
@Resource

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.rservices.core.impl;
import au.com.royalpay.payment.core.TransactionService;
import au.com.royalpay.payment.core.beans.TransactionBizSubType;
import au.com.royalpay.payment.core.mappers.PmtOrderMapper;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
@ -166,7 +167,7 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
transaction.put("clearing_status", 0);
transaction.put("remark", applyInfo.getString("service_code") + ":" + applyInfo.getString("title"));
transaction.put("system_generate", 1);
transactionService.saveTransaction(transaction);
transactionService.saveTransaction(transaction, TransactionBizSubType.OTHER);
JSONObject order = new JSONObject();
order.put("order_id", orderId);
order.put("org_id", client.getIntValue("org_id"));

@ -40,8 +40,4 @@ public class SettleEstimateTaskManger {
synchronizedScheduler.executeProcess("manage_task:genSettleLog", 120_000, () -> platformClearService.generateSettleLogs());
}
@Scheduled(cron = "0 0 10 * * ?")
public void generateSettleLogs2() {
synchronizedScheduler.executeProcess("manage_task:generateAliPaySettleLog", 120_000, () -> platformClearService.generateAliPaySettleLogs());
}
}

@ -3,9 +3,9 @@ package au.com.royalpay.payment.manage.tradelog.core.impls;
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;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SettlementLog;
import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.TransactionService;
import au.com.royalpay.payment.core.beans.SettlementLog;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.OrderNotMatchException;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;

@ -2,16 +2,68 @@ app:
alipay:
host: https://mapi-hk.alipay.com/gateway.do
merchants:
online:
key: hmwjrganlzb4aqgggdgdlod7l3lsjkn6
- key: hmwjrganlzb4aqgggdgdlod7l3lsjkn6
pid: 2088821643021586
pid-type: ONLINE
biz-type: ONLINE
private-key: classpath:data/crypt/alipay_private.pem
public-key: classpath:data/crypt/alipay_public.pem
sftp-password: XNBB3S
sftp-username: openvisePTY
retail:
key: jb5mt4vhtlzg1xlc0k967sib7v81sba6
- key: jb5mt4vhtlzg1xlc0k967sib7v81sba6
pid: 2088721525235246
pid-type: RETAIL
biz-type: RETAIL
sftp-password: XNBB3S
sftp-username: openvisePTY
sftp-host: sftp.alipay.com
- pid: SANDBOX_5Y2Z6G2Y6CD006426
bill-pid: ''
pid-type: CONNECT
biz-type: RETAIL
api-prefix: /ams
private-key-string: |-
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7Q56Mi0ESd7lIImLl/qvoHry8M1pg6qMyzzsMsHe6kMMculI7B7G2/fGpSS2JC46jZrVRb/fYf1NLehhAh1MK51md/7dEgqjkowtXIjhEQTPXwTWWkxtnb/l+KoqWtBrkOfMIef+O6QbqvveneLlCq9wMnvKNsj0p9GtUKxYUyxY8Nwuc2tf2wG2zKuh0JoRMLMRMayr7WdhAy4jatJS5pDjJqoIxyhD6X7fPleoeJgzyYSZAPgnH01TSO5ePFQZ/7SxDRC8+D5rAnefsridaabmeBQG2QWf4Gz7qPuavnZfwKzkjptj390+D0PAR3f3JCvYXTrRRUGKdVpiuuFAbAgMBAAECggEBAJrmxUjWi9494Kq1nv9HGWYpvs8i33jZvmNyHhNSCcfupSanTQv9QljvWK5ClQMO509sz0FtECQqtnjxpwwBpISZeH0EoNFwD0sJP4E1EjwLf1nSPYSvbPS0IDnn8LnWg4QUF2AEoovRYGJf0zXZ2801ohFijZr+PC/vObTm6x4IsVasse+urTpAKb1XBnkOF2eKFTM4JdRHFSl4Uk0npdPtULUEvACpsORrBVjJz1dWjIkvHeOrqv5rKR1bxuRlhiDcVoDb7oDD3KIqR93YljOI0mdXLm2DuboGEpj0yKZYU+RaPWxMOErRT99UIAAVpPDVjGKZdt95K6BrWoqxq7kCgYEA5bzUMCM6/0jLt/kmuwkOF+zckz4DLtWFlosGrf658of9PQIvjkZbun3TcpJ2aQ8g7k2qFAUvwc5Uy5G0lW+uCIRA7zcKd2Rz4Rb4Q8qgI+9bIOuDjmvg36zOvqg3xuepoYq/2jcFGR+cBFGpbEu0VWESW3vytDsMosDp4xYkvt0CgYEA0KvSnx9ZqNHINQJCTgLd+mWbEv4lTSDXwi/OBtS8O7tTQRw73OkpOXobXv/vhTV4KimPOWTFFSEZcY7Rl0eyFV7rQD+gIioTCpt4m/ez/zImCv11tQWBqa/GoqZ0d0P9HPgmVjMh8Be0CVTEzGgXeOD2mcP+0WJCns/Js2s2j1cCgYEAk6EOMYjSJq4eyzA+JT6iYdmBvNTCstvfJmhceH8R+rpMj2HSMXkhBOxKbnuTv9tK7BfYTVkv4Ti34MDW7JiBm1NxbsdN4H8av/BExTt2QOFVDAiL13+XV+TyTi5G+Xhw1zAULSPiEMzxMw1O9BqJ3butUkCKLCst6YBSS+0027kCgYEAn+BFiyzV4QZ5wkNs0aBYupRGcBLQOXvEUz+VNp6faZRogSZEp0jtEOCBQBQPS5xf6M3Wsj6G0V1+xQaLhsCjrMQAskUNR5+83w+nJLhv7EJb62euW3dQlNXb9ppZ+VbaAuwNU1Xx1qYShmOwNHw8H50c00rbXUlPiaXh/9lRABkCgYBC9cIcIEutg3hmOlGrRVSSNnuYVO2MuLAIK1KnQftpZHZ+euuCnhPaoC3ZOtenWoBwgS6qV4Mpxq30qcc/mUouErpqUcrNxawlVgWjTSwNd6rT2MBg1lcOxpqsR9ZWolBp4nHvnbLxhI+2KiXpRV9Y8Gbkw1jI8/tMYcSEJsOfEA==
public-key-string: |-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqME6KAPZcMlFuy19J+RAj34PaS6iuyjINzQvdjR808IeVQAcLdUULMEgCTSQLshC606GFoGkN5nOouoMCZQmPv9hbZSWcDHMrPNNVYuAqwk0N80FSnASNPtlucoqzVjAaqgXD88hqjODCIS/b9LWrprCA3q3aAfVQu3eQLoFM1nn9EdznCp0uVClHgLtwj1rMRkjN+4CSwOW66/RNzsgnDJMkrTlRDeJCrbdXAs0Q3MWQEQv2z1fd34U1yyY2StkHbfKAVp2cCzhSl26K3LcCooDv9VDSv3BDH58sBQ8TIprIW0EsDA4jbLXEDEKXIjqIOaC/+x8jXyRpci17ZvRowIDAQAB
pid-host: https://open-sea.alipay.com
- pid: SANDBOX_5Y372Y2YBKQN02382
bill-pid: 'Z02TE1650000000A'
pid-type: APS
biz-types:
- ONLINE
- RETAIL
api-prefix: /aps
private-key-string: |-
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDWXsXs+dZPb/cd
BSmffOCjjoXLBQmAtrr9etHQBRUARP2jROppMYlvpfHkBvDlSs8mkz5dNeFF9L0z
QblRWxgW2658nq6u833CjPgTROsLEQZIrJuGCWwQuNslv8ACoKW/FippMDLnDUfk
/41TfzIiMhVrAUuy7P14pa/O8fIrDXMU/G1jknhPfvpLqkPfAB9N2Bf/F61XZsNN
3Xco8X/wW8EdGaw1NdS2hjNvAvuxlcVexqPwXoECJgPQNip/9G/a+8NmKn7hLL1V
8eXyC2J5pBMGq+H52Z2Su/jTyK9h5Qs9j42rQaBp06PHxfK4PhziIVaskLSqNO+j
IrONpumzAgMBAAECggEAEepHtj9G5sqfp0A4M0j3aRPPIKFiIuyige6SvETAdY5O
eCeZQ4NNThRbO8hMt4zh9QJXMuj+057ZdQAoIaFwSPDBC08joCFfQDQRw2J+FiWt
FcO/F5uP+XHJdsUooc+VKnwKvVG231Jf0MZ+pBy8Ltlqqs+n6OMfZ8bJA416xJgq
35tfzKA1orpXtMk8YF7RrCnUlAxYWG5t30kqS/i7k0XtnaG26f0x/TllA+bT8G0I
Sv6JHlJYUh7GwjRmvt9DWnCIWCfr0HnIfDG28Hj1ZrIgpCULiM9/0JHB0DYj7xWn
kIYnN8M+aPi0uc10GPKpf6Z9d6BfKlTjkwjSSBADGQKBgQD9lPqEBUuYQYrG+mqJ
3eQQ/ydt7LJ+q9k2Nv0v0yxp2VeZfGHy3IpJzL3tg38+YXY+BpUa30QjyEjD+TCz
+9Q/DR/d0chR+2+ZKB69RA39GjLNvebS6IogAzZi0+a4h48iB+4o9E39vJNZEfZt
ICa+QYBdfJuJ/hYfmmeVafTixwKBgQDYahML6Oj14qw+8ymEXToPwdYRs7+bikiw
BKU3t5jj+74kYGMBA5i1AdYA9pl7QZaLUPToPOyfG+YWzWKes1VrAq55h3h44S1S
REBK7pct9EmeXBajAmYJf+4smamWgmNvfOB1f6K4Bvz/wr/eSiOAXBtt2OMKe1H/
kr0E85XVtQKBgCftYDCPYOK9VyuTXFkO3g0rD7tILKazSkU2DVGNb43PEfLx2b5S
qVeLbFBMhyl8URDdGncbtm/n5kUtJFUCjt3KpDzZ/i+iZmT4Izbr00QJ7vvkLccB
pFX8C4EuGkLt3USfeQlrxifwnEbHBEUUbeVBDQQrTZZBspwRRMQK5esbAoGAT7bi
xSRJiyivYZCX3lWoqV0wyNx424YYOB297cQG4RM9epC2Zw04FpRSi5BKAIisNyze
yRyH3COeoQ+OH/7Wm9AlDEbGLWBkHUVemTtBHIA7DcXF4M1lYGJrDKqdOP9WOR66
Xw1gloCceGj3251bblB/GfslxhqenZEjZsuCiXECgYAYSe9ZS2pK06NG/0qqEK2t
LktRAEZLMZNKoCfTZ73Tv/3RbIKOTih/0u1esAz8ZNDba1rCY/Yk7tEnn7TdBmh6
tZ2ioys08F2bZingLcTGes1s86/ideNGeoKT2e+071dD/AfdTqchaFRZdYlyPrF7
Geg8LExk9alI9NEyoD7cKA==
public-key-string: |-
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkuBPpcDeFpO12FUgi4UGHWCJ6OdPp0GVvYFUSJzJ+KNUodFpmgw306rNA+0Q5Bn/mw9aaqGCCmZYPpF4TnzGqQcLrAFABW+tpUfGj3WwNndhLyCBnqvp740iufsCaLvzlZyQplL8CBQ4AQPdIVa4YlCiX+AxJNq+kXsNvgUKK0iDLujYE6XzgjOCSq03tFfY3ry58DoEvf86WmS+fP7zAl77kmDf1CmJa5V06aviUlzmuyo/p8m3fUucB1Fv3WNF7qRpNPkMuL6jjHenb9LzWr1tieRTd7mZxOd9KOq75CJiX4XiTHhWbvd2pW/NIkDPZ9dAJPSK57mrh+e7zgT2pQIDAQAB
pid-host: https://open-sea.alipayplus.com
enabled: true
sftp-username: test_upload
sftp-password: 123456
sftp-host: sftp-dev.alipay.com

@ -4,15 +4,65 @@ spring:
host: 192.168.0.92:3306
jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
password: SuTUUxyvzS0cLETi6Rzm
schema-name: royalpay_payment
schema-name: royalpay
username: rpaydev
slave:
host: 192.168.0.84:3306
host: 192.168.0.92:3306
jdbc-url: jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
password: rpayplus123
password: SuTUUxyvzS0cLETi6Rzm
schema-name: royalpay
username: root
username: rpaydev
type: com.zaxxer.hikari.HikariDataSource
#spring:
# datasource:
# master:
# host: office.geekforbest.com:33306
# jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# username: rpaydev_out
# schema-name: royalpay
# password: SuTUUxyvzS0cLETi6Rzm
# slave:
# host: office.geekforbest.com:33306
# jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# username: rpaydev_out
# schema-name: royalpay
# password: SuTUUxyvzS0cLETi6Rzm
#spring:
# datasource:
# master:
# host: 127.0.0.1:3306
# jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# password: dalong
# schema-name: royalpay_payment
# username: root
# slave:
# host: 127.0.0.1:3306
# jdbc-url: jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# password: dalong
# schema-name: royalpay_payment
# username: root
# type: com.zaxxer.hikari.HikariDataSource
#spring:
# datasource:
# master:
# host: 119.28.3.196:3310
# jdbc-url: jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# password: read0nly
# schema-name: royalpay_production
# username: readonly
# slave:
# host: 119.28.3.196:3310
# jdbc-url: jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
# password: read0nly
# schema-name: royalpay_production
# username: readonly
# type: com.zaxxer.hikari.HikariDataSource
# redis:
# database: 1
# host: 127.0.0.1
# port: 6379
redis:
database: 1
host: 192.168.0.84
@ -23,10 +73,10 @@ spring:
app:
run-tasks: false
host:
main: http://192.168.0.38:5000/
main: http://dalong-au.dev.rpaygroup.com/
regions:
au: http://192.168.0.38:5000/
cn: http://192.168.0.38:5000/
au: http://dalong-au.dev.rpaygroup.com/
cn: http://dalong-au.dev.rpaygroup.com/
mail:
appid: 1
host: https://dev.mailsupport.hcqtech.com

@ -1,23 +1,23 @@
app:
wechatpay:
api-host: https://apihk.mch.weixin.qq.com
api-host: https://api.mch.weixin.qq.com
merchants:
'1307485301':
app-id: wx703febcbd34dae38
example-sub-merchant-id: 11755174
key-file: classpath:apiclient_cert.p12
key-file: /Users/qingjiaoxuan/extra/apiclient_cert.p12
mch-key: 7e2d8c4aab15e4cabec1207ba79086b1
merchant-id: 1307485301
'1431999902':
app-id: wx703febcbd34dae38
example-sub-merchant-id: 42991963
key-file: classpath:apiclient_new_cert.p12
key-file: /Users/qingjiaoxuan/extra/apiclient_new_cert.p12
mch-key: p3tgzrAJbe6eQrunbv8jb8gz5yXxvJdE
merchant-id: 1431999902
'1487387142':
app-id: wx3e14d1144d898197
example-sub-merchant-id: 117551742
key-file: classpath:napclient_cert.p12
key-file: /Users/qingjiaoxuan/extra/napclient_cert.p12
mch-key: OuvLIL93STqFhTngNaBGT8751ZJn4FKL
merchant-id: 1487387142
mp-id: globalpay

@ -2,7 +2,7 @@ server:
port: 5555
spring:
profiles:
active: dev,alipay,bestpay,jd,wechat,rpay,yeepay,rppaysvc,common
active: dev,alipay,bestpay,jd,wechat,rpay,yeepay,rppaysvc,common,alipayplusaps
mail:
host: ''
port: ''
@ -90,7 +90,7 @@ android:
apple:
message:
apns:
file: src/main/resources/dev.p12
file: classpath:dev.p12
password: HQeYblIajOb0
saneboxMode: true
customer:

@ -344,6 +344,12 @@
ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.total ELSE 0 END),0) alipayonlineamount,
ifnull(sum(CASE WHEN s.channel = 'AlipayOnline' THEN s.orders ELSE 0 END),0) alipayonline_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'AlipayOnline',TRUE,NULL)),0) alipayonline_client_count,
ifnull(sum(CASE WHEN s.channel = 'ApsInStore' THEN s.total ELSE 0 END),0) apsinstoreamount,
ifnull(sum(CASE WHEN s.channel = 'ApsInStore' THEN s.orders ELSE 0 END),0) apsinstore_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'ApsInStore',TRUE,NULL)),0) apsinstore_client_count,
ifnull(sum(CASE WHEN s.channel = 'ApsCashier' THEN s.total ELSE 0 END),0) apscashieramount,
ifnull(sum(CASE WHEN s.channel = 'ApsCashier' THEN s.orders ELSE 0 END),0) apscashier_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'ApsCashier',TRUE,NULL)),0) apscashier_client_count,
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.total ELSE 0 END),0) hfamount,
ifnull(sum(CASE WHEN s.channel = 'hf' THEN s.orders ELSE 0 END),0) hf_order_count,
ifnull(COUNT(DISTINCT s.client_id,IF(s.channel = 'hf',TRUE,NULL)),0) hf_client_count,

@ -11,18 +11,17 @@
</select>
<select id="calculateSysSettleLog" resultType="com.alibaba.fastjson.JSONObject">
SELECT
sum(cny_amount) rmb_amount,
ifnull(sum(clearing_amount),0.00) aud_amount,
ifnull(sum(ROUND(clearing_amount * #{wechat_rate},2)),0.00) charge_amount
FROM
pmt_transactions
WHERE
order_channel = #{channel}
AND transaction_type = #{transaction_type}
AND transaction_time >= #{start_date}
AND #{end_date} > transaction_time
and system_generate =0
SELECT sum(t.cny_amount) rmb_amount,
ifnull(sum(t.clearing_amount), 0.00) aud_amount,
ifnull(sum(t.channel_surcharge), 0.00) charge_amount
FROM pmt_transactions t
inner join pmt_orders o on o.order_id = t.order_id
WHERE o.merchant_id = #{pid}
and order_channel = #{channel}
AND transaction_type = #{transaction_type}
AND transaction_time >= #{start_date}
AND #{end_date} > transaction_time
and system_generate = 0
</select>
<select id="calculateRmbCharge" resultType="decimal">
@ -38,20 +37,16 @@
AND #{end_date} > transaction_time
AND system_generate = 0
</select>
<select id="calculateSysSettleLog5" resultType="com.alibaba.fastjson.JSONObject">
SELECT
ifnull(sum(cny_amount),0.00) rmb_amount,
ifnull(sum(clearing_amount),0.00) aud_amount,
ifnull(sum(ROUND(cny_amount * 0.005,2)),0.00) charge_amount
FROM
pmt_transactions
WHERE
order_channel = #{channel}
AND transaction_type = #{transaction_type}
AND transaction_time >= #{start_date}
AND #{end_date} > transaction_time
and system_generate =0
<select id="calculateChannelSysSettleLog" resultType="com.alibaba.fastjson.JSONObject">
SELECT sum(t.cny_amount) rmb_amount,
ifnull(sum(t.clearing_amount), 0.00) aud_amount,
ifnull(sum(t.channel_surcharge), 0.00) charge_amount
FROM pmt_transactions t
WHERE order_channel = #{channel}
AND transaction_type = #{transaction_type}
AND transaction_time >= #{start_date}
AND #{end_date} > transaction_time
and system_generate = 0
</select>
</mapper>

@ -18,6 +18,7 @@
o.client_order_id,
o.gateway,
o.channel,
o.pay_type,
o.pre_authorization,
p.client_moniker,
p.short_name,
@ -48,6 +49,7 @@
o.confirm_time pay_time,
o.pre_authorization,
o.source,
o.pay_type,
CASE o.status
WHEN 0
THEN 'SUBMITTING'
@ -159,7 +161,7 @@
select oo.order_id,oo.client_id,oo.total_amount,oo.display_amount,
oo.customer_payment_amount,oo.coupon_payment_amount,oo.currency,
oo.create_time,oo.confirm_time,oo.status,oo.order_description,oo.order_detail,
oo.client_order_id,oo.gateway,oo.channel,oo.pre_authorization,oo.refund_amount,oo.customer_id,oo.source
oo.client_order_id,oo.gateway,oo.channel,oo.pre_authorization,oo.refund_amount,oo.customer_id,oo.source,oo.pay_type
from pmt_orders oo
<where>
<if test="search_text != null">
@ -301,7 +303,7 @@
select oo.order_id,oo.client_id,oo.total_amount,oo.display_amount,
oo.customer_payment_amount,oo.coupon_payment_amount,oo.currency,
oo.create_time,oo.confirm_time,oo.status,oo.order_description,oo.order_detail,
oo.client_order_id,oo.gateway,oo.channel,oo.pre_authorization,oo.refund_amount,oo.customer_id,oo.source
oo.client_order_id,oo.gateway,oo.channel,oo.pre_authorization,oo.refund_amount,oo.customer_id,oo.source,oo.pay_type
from pmt_orders oo
<where>
<if test="search_text != null">

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.aps.ApsConfigMapper">
<resultMap type="au.com.royalpay.payment.manage.merchants.entity.ApsConfigData" id="ApsConfigResult">
<result property="id" column="id"/>
<result property="creator" column="creator"/>
<result property="createTime" column="create_time"/>
<result property="modifier" column="modifier"/>
<result property="modifyTime" column="modify_time"/>
<result property="enableAlipayAps" column="enable_alipayaps"/>
<result property="alipayCnSwitch" column="alipay_cn_switch"/>
<result property="clientId" column="client_id"/>
</resultMap>
<update id="updateApsConfigClientId">
UPDATE sys_client_aps_config SET modify_time = now(), modifier = #{modifier}
<if test="alipayCnSwitch !=null">, alipay_cn_switch = #{alipayCnSwitch}</if>
<if test="enableAlipayAps !=null">, enable_alipayaps = #{enableAlipayAps}</if>
WHERE client_id = #{clientId}
</update>
</mapper>

@ -173,7 +173,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis'
},
legend: {
data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额","LakalaPay交易金额","Card Payment交易金额","Direct Debit交易金额"],
data: ['Alipay交易金额','AlipayOnline交易金额', 'Bestpay交易金额','Wechat交易金额',"JD Pay交易金额","HF Pay交易金额","Yeepay交易金额","LakalaPay交易金额","Card Payment交易金额","Direct Debit交易金额","Alipay+交易金额","Alipay+(Online)交易金额"],
bottom: 0,
height: '15%',
width: '80%',
@ -185,7 +185,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value'
}
],
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"]
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"]
},
xAxis: {
basic: {type: 'category', boundaryGap: false},
@ -301,6 +301,28 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0
},
column: {key: 'rpaypmt_dd.total'}
},
{
basic: {
name: 'Alipay+交易金额',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsInStore.total'}
},
{
basic: {
name: 'Alipay+(Online)交易金额',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsCashier.total'}
}
]
};
@ -311,7 +333,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis'
},
legend: {
data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单","LakalaPay交易订单","Card Payment交易订单","Direct Debit交易订单"],
data: ['Alipay交易订单','AlipayOnline交易订单', 'Bestpay交易订单','Wechat交易订单',"JD Pay交易订单","HF Pay交易订单","Yeepay交易订单","LakalaPay交易订单","Card Payment交易订单","Direct Debit交易订单","Alipay+交易订单","Alipay+(Online)交易订单"],
bottom: 0,
height: '15%',
width: '80%',
@ -323,7 +345,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value'
}
],
color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"]
color: ['#00a0e9','00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"]
},
xAxis: {
basic: {type: 'category', boundaryGap: false},
@ -439,6 +461,28 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0
},
column: {key: 'rpaypmt_dd.orders'}
},
{
basic: {
name: 'Alipay+交易订单',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsInStore.orders'}
},
{
basic: {
name: 'Alipay+(Online)交易订单',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsCashier.orders'}
}
]
};
@ -448,7 +492,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
trigger: 'axis'
},
legend: {
data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价","LakalaPay交易客单价","Card Payment交易客单价","Direct Debit交易客单价"],
data: ['Alipay交易客单价','AlipayOnline交易客单价', 'Bestpay交易客单价','Wechat交易客单价',"JD Pay交易客单价","HF Pay交易客单价","Yeepay交易客单价","LakalaPay交易客单价","Card Payment交易客单价","Direct Debit交易客单价","Alipay+交易客单价","Alipay+(Online)交易客单价"],
bottom: 0,
},
yAxis: [
@ -457,7 +501,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
type: 'value'
}
],
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec"]
color: ['#00a0e9','#00a0e9','#FF2D96','#09bb07','#DC0808',"#FFFF33","#66ff00","#00b0ec","#8f4b2e","#87843b","#f8aba6"]
},
xAxis: {
basic: {type: 'category', boundaryGap: false},
@ -573,6 +617,28 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
yAxisIndex: 0
},
column: {key: 'rpaypmt_dd.single_amount'}
},
{
basic: {
name: 'Alipay+交易客单价',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsInStore.single_amount'}
},
{
basic: {
name: 'Alipay+(Online)交易客单价',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0
},
column: {key: 'ApsCashier.single_amount'}
}
]
};

@ -140,8 +140,12 @@
</thead>
<tbody>
<tr ng-repeat="channels in countChannels |orderBy:'total':true">
<td style="text-align: center;font-style: italic;font-size: larger"
<td style="text-align: center;font-style: italic;font-size: larger" ng-if="channels.channel!='ApsCashier'&&channels.channel!='ApsInStore'"
ng-bind="channels.channel"></td>
<td style="text-align: center;font-style: italic;font-size: larger" ng-if="channels.channel=='ApsInStore'"
>Alipay+</td>
<td style="text-align: center;font-style: italic;font-size: larger" ng-if="channels.channel=='ApsCashier'"
>Alipay+(Online)</td>
<td ng-bind="channels.total"></td>
<td ng-bind="channels.order"></td>
<td ng-bind="channels.transaction_partners"></td>
@ -159,21 +163,21 @@
<div class="box box-warning">
<div class="box-header with-border">交易总金额变化趋势</div>
<div class="box-body">
<div class="chart" echarts="channel_total_chart" style="height: 300px"
<div class="chart" echarts="channel_total_chart" style="height: 330px"
ng-class="{nodata:channel_total_chart.nodata}"></div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">订单数变化趋势</div>
<div class="box-body">
<div class="chart" echarts="channel_order_chart" style="height: 300px"
<div class="chart" echarts="channel_order_chart" style="height: 330px"
ng-class="{nodata:channel_order_chart.nodata}"></div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">客单价变化趋势</div>
<div class="box-body">
<div class="chart" echarts="channel_single_amount_chart" style="height: 300px"
<div class="chart" echarts="channel_single_amount_chart" style="height: 330px"
ng-class="{nodata:channel_single_amount_chart.nodata}"></div>
</div>
</div>

@ -85,22 +85,18 @@ Ye<style>
ng-click="params.channel='ALIPAY';doAnalysis(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='AlipayOnline'}"
ng-click="params.channel='AlipayOnline';doAnalysis(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';doAnalysis(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';doAnalysis(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';doAnalysis(1)">Alipay+(Online)</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a>
</p>
</div>
</div>

@ -95,22 +95,16 @@
ng-click="params.channel='ALIPAY';doAnalysis(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='AlipayOnline'}"
ng-click="params.channel='AlipayOnline';doAnalysis(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';doAnalysis(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';doAnalysis(1)">HF Pay</a>
<a role="button" ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';doAnalysis(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';doAnalysis(1)">Alipay+(Online)</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a>
</p>
</div>
</div>

@ -95,20 +95,14 @@
ng-click="params.channel='ALIPAY';doAnalysis(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='AlipayOnline'}"
ng-click="params.channel='AlipayOnline';doAnalysis(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';doAnalysis(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<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> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';doAnalysis(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';doAnalysis(1)">Alipay+(Online)</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>
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a>
</p>
</div>
</div>

@ -97,22 +97,15 @@
ng-click="params.channel='ALIPAY';doAnalysis(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='AlipayOnline'}"
ng-click="params.channel='AlipayOnline';doAnalysis(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';doAnalysis(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';doAnalysis(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';doAnalysis(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';doAnalysis(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';doAnalysis(1)">Alipay+(Online)</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';doAnalysis(1)">RPay +</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a>
</p>
</div>
</div>
@ -171,18 +164,7 @@
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/bestpay_sign.png"/>Bestpay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.bestpayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.bestpay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.bestpay_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/alipay_sign.png"/>Alipay</div>
@ -207,32 +189,7 @@
</div>
</div>
<div class="col-sm-2 col-xs-6">
<div class="description-block">
<div class="description-header text-bold"><img src="/static/images/jd_sign.png"/>JD Pay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.jdamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.jd_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.jd_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/hf_sign.png"/>HF Pay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.hfamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.hf_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.hf_client_count }}</label>
</div>
</div>
</div>
</div>
<div class="row">
<!-- 显示Rpay+交易额分析-->
<div class="col-sm-2 col-xs-6">
<div class="description-block">
@ -245,47 +202,43 @@
</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/yeepay_sign.png"/>Yeepay</div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.yeepayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.yeepay_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.yeepay_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/lakalapay_sign.png"/>LakalaPay</small></div>
<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.lakalapayamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.lakala_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.lakala_client_count }}</label>
ng-bind="totalChannelAmount.rpaypmt_cardamount|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>
<div class="row">
<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-header text-bold"><small><img src="/static/images/alipay_aps.jpg" style="height: 30px"/>Alipay+</small></div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_cardamount|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>
ng-bind="totalChannelAmount.apsinstoreamount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.apsinstore_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.apsinstore_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-header text-bold"><small><img src="/static/images/alipay_aps.jpg" style="height: 30px"/>Alipay+(Online)</small></div>
<div class="description-text">
<label class="description-text text-red"
ng-bind="totalChannelAmount.rpaypmt_ddamount|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>
ng-bind="totalChannelAmount.apscashieramount|currency: ' $ '"></label></br>
<label class="description-text text-red">交易笔数:{{ totalChannelAmount.apscashier_order_count }}</label>
<label class="description-text text-red">交易商户数:{{ totalChannelAmount.apscashier_client_count }}</label>
</div>
</div>
</div>

@ -35,22 +35,17 @@
ng-click="params.channel='ALIPAY';loadTradeLogs()">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='AlipayOnline'}"
ng-click="params.channel='AlipayOnline';loadTradeLogs(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs()">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='jd'}"
ng-click="params.channel='jd';loadTradeLogs()">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='hf'}"
ng-click="params.channel='hf';loadTradeLogs()">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';loadTradeLogs(1)">Alipay+</a>|
<a role="button" ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';loadTradeLogs(1)">Alipay+(Online)</a>|
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';doAnalysis(1)">Card Payment</a>
</p>
</div>
</div>

@ -104,115 +104,6 @@
</div>
</div>
</div>
<div ng-if="org.commission_type == 1">
<div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100" min="0"readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="cb_bankpay_rate_value_input">CBBank Pay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.cb_bankpay_rate_value" id="cb_bankpay_rate_value_input" name="cb_bankpay_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div>
<div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_wechat_rate"
id="min_wechat_rate_input" name="min_wechat_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_alipay_rate"
id="min_alipay_rate_input" name="min_alipay_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_bestpay_rate"
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_jd_rate"
id="min_jd_rate_input" name="min_jd_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_cb_bankpay_rate_input">Min CBBank Pay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_cb_bankpay_rate"
id="min_cb_bankpay_rate_input" name="min_cb_bankpay_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
@ -286,6 +177,533 @@
id="remark-input" maxlength="500"></textarea>
</div>
</div>
<div ng-if="org.type == 0">
<div class="panel panel-default">
<div class="panel-heading">China Wallets Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group"
ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-5" for="wechat_rate_value_input">Wechat
Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.wechat_rate_value"
id="wechat_rate_value_input"
name="wechat_rate_value"
max="100"
min="0"
required
style="width: 100% !important"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-5" for="alipay_rate_value_input">Alipay
Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.alipay_rate_value"
id="alipay_rate_value_input"
name="alipay_rate_value"
max="100"
min="0"
required
style="width: 100% !important"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-5"
for="alipayonline_rate_value_input">AlipayOnline
Rate *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.alipayonline_rate_value"
id="alipayonline_rate_value_input"
name="alipayonline_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-5" for="cb_bankpay_rate_value_input">CB
BankPay Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.cb_bankpay_rate_value"
id="cb_bankpay_rate_value_input"
name="cb_bankpay_rate_value"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<!--<div class="form-group" ng-class="{'has-error':org_form.rpaypmt_card_rate_value.$invalid && org_form.rpaypmt_card_rate_value.$dirty}">
<label class="control-label col-sm-2" for="rpaypmt_card_rate_value_input">Card Payment Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rpaypmt_card_rate_value" id="rpaypmt_card_rate_value_input" name="rpaypmt_card_rate_value" max="100" min="0" required>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>-->
</div>
<div class="col-sm-6">
<div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-5" for="min_wechat_rate_input">Min
Wechat
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_wechat_rate"
id="min_wechat_rate_input"
name="min_wechat_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-5" for="min_alipay_rate_input">Min
Alipay
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_alipay_rate"
id="min_alipay_rate_input"
name="min_alipay_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-5" for="min_alipayonline_rate_input">Min
Alipayonline Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input"
name="min_alipayonline_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-5" for="min_cb_bankpay_rate_input">Min
CB
BankPay Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_cb_bankpay_rate"
id="min_cb_bankpay_rate_input"
name="min_cb_bankpay_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<!-- <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_card_rate.$invalid && org_form.min_rpaypmt_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_rpaypmt_card_rate_input">Min Card Payment Rate</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_rpaypmt_card_rate"
id="min_rpaypmt_card_rate_input" name="min_rpaypmt_card_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div>
</div>-->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Card Payment Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<!-- 卡支付-国内卡费率配置 -->
<div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_domestic_card_rate_value.$invalid && org_form.rpaypmt_domestic_card_rate_value.$dirty}">
<label class="control-label col-sm-5"
for="rpaypmt_domestic_card_rate_value_input">Domestic Card
Payment Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_domestic_card_rate_value"
id="rpaypmt_domestic_card_rate_value_input"
name="rpaypmt_card_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<!-- 卡支付-国际卡费率配置 -->
<div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_overseas_card_rate_value.$invalid && org_form.rpaypmt_overseas_card_rate_value.$dirty}">
<label class="control-label col-sm-5"
for="rpaypmt_overseas_card_rate_value_input">International Card
Payment
Rate *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_overseas_card_rate_value"
id="rpaypmt_overseas_card_rate_value_input"
name="rpaypmt_card_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_dd_rate_value.$invalid && org_form.rpaypmt_dd_rate_value.$dirty}">
<label class="control-label col-sm-5" for="rpaypmt_dd_rate_value_input">Direct
Debit Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_dd_rate_value"
id="rpaypmt_dd_rate_value_input"
name="rpaypmt_dd_rate_value"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_domestic_card_rate.$invalid && org_form.min_rpaypmt_domestic_card_rate.$dirty}">
<label class="control-label col-sm-5"
for="min_rpaypmt_domestic_card_rate_input">Min Domestic Card
Payment
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_domestic_card_rate"
id="min_rpaypmt_domestic_card_rate_input"
name="min_rpaypmt_domestic_card_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_overseas_card_rate.$invalid && org_form.min_rpaypmt_overseas_card_rate.$dirty}">
<label class="control-label col-sm-5"
for="min_rpaypmt_overseas_card_rate_input">Min International Card
Payment
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_overseas_card_rate"
id="min_rpaypmt_overseas_card_rate_input"
name="min_rpaypmt_overseas_card_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_dd_rate.$invalid && org_form.min_rpaypmt_dd_rate.$dirty}">
<label class="control-label col-sm-5" for="min_rpaypmt_dd_rate_input">Min
Direct
Debit Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_dd_rate"
id="min_rpaypmt_dd_rate_input"
name="min_rpaypmt_dd_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Alipay+ Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group"
ng-class="{'has-error':org_form.retail_interchange_fee_value.$invalid && org_form.retail_interchange_fee_value.$dirty}">
<label class="control-label col-sm-5"
for="retail_interchange_fee_value_input">
Retail Interchange Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.retail_interchange_fee_value"
id="retail_interchange_fee_value_input"
name="retail_interchange_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.retail_service_fee_value.$invalid && org_form.retail_service_fee_value.$dirty}">
<label class="control-label col-sm-5"
for="retail_service_fee_value_input">
Retail Service Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.retail_service_fee_value"
id="retail_service_fee_value_input"
name="retail_service_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.online_interchange_fee_value.$invalid && org_form.online_interchange_fee_value.$dirty}">
<label class="control-label col-sm-5"
for="online_interchange_fee_value_input">
Online Interchange Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.online_interchange_fee_value"
id="online_interchange_fee_value_input"
name="online_interchange_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.online_service_fee_value.$invalid && org_form.online_service_fee_value.$dirty}">
<label class="control-label col-sm-5"
for="online_service_fee_value_input">
Online Service Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.online_service_fee_value"
id="online_service_fee_value_input"
name="online_service_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group"
ng-class="{'has-error':org_form.min_retail_interchange_fee.$invalid && org_form.min_retail_interchange_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_retail_interchange_fee_input">Min Retail
Interchange Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_interchange_fee_value"
id="min_retail_interchange_fee_input"
name="min_retail_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_retail_service_fee.$invalid && org_form.min_retail_service_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_retail_service_fee_input">Min Retail
Service Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_service_fee_value"
id="min_retail_service_fee_input"
name="min_retail_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_online_interchange_fee.$invalid && org_form.min_online_interchange_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_online_interchange_fee_input">Min
Online Interchange Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_interchange_fee_value"
id="min_online_interchange_fee_input"
name="min_online_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_online_service_fee.$invalid && org_form.min_online_service_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_online_service_fee_input">Min
Online Service Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_service_fee_value"
id="min_online_service_fee_input"
name="min_online_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="update(org_form)">Save

@ -65,7 +65,31 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
})
}
$scope.loadAliOnlineLogs(1)
$scope.loadBestpayLog = function () {
$scope.loadAlipayApsInStoreLogs = function (page) {
var params = $scope.queryParams || {}
params.page = page || $scope.apsInStorePagination.page || 1
params.limit = 20
params.channel = 'ApsInStore'
$http.get('/platform/analysis/settle/log', { params: params }).then(function (resp) {
$scope.apsInStoreLogs = resp.data.data
$scope.apsInStorePagination = resp.data.pagination
})
}
$scope.loadAlipayApsInStoreLogs(1)
$scope.loadAlipayApsCashierLogs = function (page) {
var params = $scope.queryParams || {}
params.page = page || $scope.apsCashierPagination.page || 1
params.limit = 20
params.channel = 'ApsCashier'
$http.get('/platform/analysis/settle/log', { params: params }).then(function (resp) {
$scope.apsCashierLogs = resp.data.data
$scope.apsCashierPagination = resp.data.pagination
})
}
$scope.loadAlipayApsCashierLogs(1)
$scope.loadBestpayLog = function () {
$http.get('/platform/analysis/settle/Bestpay').then(function (resp) {
$scope.bestpayLogs = resp.data
})
@ -77,6 +101,9 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
$scope.loadAliLogs(1)
$scope.loadAliOnlineLogs(1)
$scope.loadWechatLogs(1)
$scope.loadAlipayApsInStoreLogs(1)
$scope.loadAlipayApsCashierLogs(1)
commonDialog.alert({
title: 'Success',
content: '校验结果已经重新生成,请查看!',
@ -97,6 +124,9 @@ define(['angular', 'decimal', 'uiRouter', 'angularEcharts', '../../analysis/repo
$http.get('/platform/analysis/generate/settle/log').then(function () {
$scope.loadWechatLogs(1)
$scope.loadAliLogs(1)
$scope.loadAlipayApsInStoreLogs(1)
$scope.loadAlipayApsCashierLogs(1)
$state.reload()
})
$state.reload()

@ -338,4 +338,150 @@
</div>
</div>
</div>
<!--Alipay+ (aps) -->
<div class="box box-warning">
<div class="box-header">
<h4 class="text-green">Alipay+ Logs</h4>
</div>
<div class="box-body table-responsive">
<p ng-if="!apsInStoreLogs.length">No Data</p>
<table class="table table-hover" ng-if="apsInStoreLogs.length">
<thead>
<tr>
<th>Date Start</th>
<th>Date End</th>
<th>Settle Date</th>
<th>Pay Fee</th>
<th>Refund Fee</th>
<th>Net Fee</th>
<th>Poundage</th>
<th>Settlement Fee</th>
<th>Unsettled</th>
<th style="text-align: center;">Validation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in apsInStoreLogs">
<td ng-bind="log.start_date.substr(0,10)"></td>
<td ng-bind="log.end_date.substr(0,10)"></td>
<td ng-bind="log.settle_date.substr(0,10)"></td>
<td ng-bind="log.pay_fee"></td>
<td ng-bind="log.refund_fee"></td>
<td>{{log.net_fee}}
<span ng-if="log.sys_net_fee==log.net_fee" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_net_fee}})</span>
<span ng-if="log.sys_net_fee!=log.net_fee" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_net_fee}})</span>
</td>
<td>{{log.surcharge}}
<span ng-if="log.sys_surcharge==log.surcharge" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_surcharge}})</span>
<span ng-if="log.sys_surcharge!=log.surcharge" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_surcharge}})</span>
</td>
<td>{{log.settlement_fee}}
<span ng-if="log.sys_settlement_fee==log.settlement_fee" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_settlement_fee}})</span>
<span ng-if="log.sys_settlement_fee!=log.settlement_fee" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_settlement_fee}})</span>
</td>
<td ng-bind="log.unsettle_fee"></td>
<td ng-if="log.sys_settlement_fee==log.settlement_fee" style="font-size:25px;text-align: center;"><a
role="button" ng-click="verifySettleLog(log)"><i
class="fa fa-check-circle text-green" uib-tooltip="校验通过"></i></a></td>
<td ng-if="log.sys_settlement_fee!=log.settlement_fee" style="font-size:25px;text-align: center;"><a
role="button" ng-click="verifySettleLog(log)"><i
class="fa fa-exclamation-circle text-red" uib-tooltip="校验未通过:点击重新验证"></i></a></td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<div class="row">
<uib-pagination ng-if="apsInStoreLogs.length"
class="pagination"
total-items="apsInStorePagination.totalCount"
boundary-links="true"
ng-model="apsInStorePagination.page"
items-per-page="apsInStorePagination.limit"
max-size="10"
ng-change="loadAlipayApsInStoreLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{apsInStorePagination.totalCount}};Total
Pages:{{apsInStorePagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
<!--Alipay+(Online) (aps) -->
<div class="box box-warning">
<div class="box-header">
<h4 class="text-green">Alipay+(Online) Logs</h4>
</div>
<div class="box-body table-responsive">
<p ng-if="!apsCashierLogs.length">No Data</p>
<table class="table table-hover" ng-if="apsCashierLogs.length">
<thead>
<tr>
<th>Date Start</th>
<th>Date End</th>
<th>Settle Date</th>
<th>Pay Fee</th>
<th>Refund Fee</th>
<th>Net Fee</th>
<th>Poundage</th>
<th>Settlement Fee</th>
<th>Unsettled</th>
<th style="text-align: center;">Validation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in apsCashierLogs">
<td ng-bind="log.start_date.substr(0,10)"></td>
<td ng-bind="log.end_date.substr(0,10)"></td>
<td ng-bind="log.settle_date.substr(0,10)"></td>
<td ng-bind="log.pay_fee"></td>
<td ng-bind="log.refund_fee"></td>
<td>{{log.net_fee}}
<span ng-if="log.sys_net_fee==log.net_fee" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_net_fee}})</span>
<span ng-if="log.sys_net_fee!=log.net_fee" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_net_fee}})</span>
</td>
<td>{{log.surcharge}}
<span ng-if="log.sys_surcharge==log.surcharge" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_surcharge}})</span>
<span ng-if="log.sys_surcharge!=log.surcharge" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_surcharge}})</span>
</td>
<td>{{log.settlement_fee}}
<span ng-if="log.sys_settlement_fee==log.settlement_fee" style="color: #0BB20C">&nbsp;&nbsp;(System:{{log.sys_settlement_fee}})</span>
<span ng-if="log.sys_settlement_fee!=log.settlement_fee" style="color: crimson">&nbsp;&nbsp;(System:{{log.sys_settlement_fee}})</span>
</td>
<td ng-bind="log.unsettle_fee"></td>
<td ng-if="log.sys_settlement_fee==log.settlement_fee" style="font-size:25px;text-align: center;"><a
role="button" ng-click="verifySettleLog(log)"><i
class="fa fa-check-circle text-green" uib-tooltip="校验通过"></i></a></td>
<td ng-if="log.sys_settlement_fee!=log.settlement_fee" style="font-size:25px;text-align: center;"><a
role="button" ng-click="verifySettleLog(log)"><i
class="fa fa-exclamation-circle text-red" uib-tooltip="校验未通过:点击重新验证"></i></a></td>
</tr>
</tbody>
</table>
<div class="panel-footer">
<div class="row">
<uib-pagination ng-if="apsCashierLogs.length"
class="pagination"
total-items="apsCashierPagination.totalCount"
boundary-links="true"
ng-model="apsCashierPagination.page"
items-per-page="apsCashierPagination.limit"
max-size="10"
ng-change="loadAlipayApsCashierLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{apsCashierPagination.totalCount}};Total
Pages:{{apsCashierPagination.totalPages}}
</div>
</div>
</div>
</div>
</div>
</div>

@ -170,6 +170,34 @@
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block border-right">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.apsinstoreamount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.apsinstore_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_aps.jpg" style="height: 25px"/>Alipay+
</div>
</div>
</div>
<div class="col-sm-4 col-xs-6">
<div class="description-block">
<div class="description-text">交易额:
<label class="description-text text-red"
ng-bind="totalChannelAmount.apscashieramount|currency: ' $ '"></label>
</div>
<div class="description-text">订单数:
<label class="description-text text-red"
ng-bind="totalChannelAmount.apscashier_order_count"></label>
</div>
<div class="description-header text-bold"><img src="/static/images/alipay_aps.jpg" style="height: 25px"/>Alipay+(Online)
</div>
</div>
</div>
</div>
</div>

@ -143,6 +143,12 @@
"label": "Trailer Parks and Campgrounds",
"mccCode": "7033",
"value": "{\"category\":\"SERVICE\",\"code\":\"7033\",\"description\":\"Trailer Parks and Campgrounds\",\"parentCode\":\"A04\"}"
},
{
"children": [],
"label": "Timeshares",
"mccCode": "7012",
"value": "{\"category\":\"SERVICE\",\"code\":\"7012\",\"description\":\"Timeshares\",\"parentCode\":\"A04\"}"
}
],
"label": "Travel & Accommodation",
@ -242,6 +248,13 @@
"label": "Chemicals and Allied Products - Not Elsewhere Classified ",
"mccCode": "5169",
"value": "{\"category\":\"SHOPPING\",\"code\":\"5169\",\"description\":\"Chemicals and Allied Products - Not Elsewhere Classified \",\"parentCode\":\"B02\"}"
}
,
{
"children": [],
"label": "Petroleum and Petroleum Products ",
"mccCode": "5172",
"value": "{\"category\":\"SHOPPING\",\"code\":\"5172\",\"description\":\"Petroleum and Petroleum Products\",\"parentCode\":\"B02\"}"
},
{
"children": [],
@ -945,6 +958,12 @@
"label": "Video Amusement Game Supplies ",
"mccCode": "7993",
"value": "{\"category\":\"SHOPPING\",\"code\":\"7993\",\"description\":\"Video Amusement Game Supplies \",\"parentCode\":\"C10\"}"
},
{
"children": [],
"label": "Antique Shops",
"mccCode": "5932",
"value": "{\"category\":\"SHOPPING\",\"code\":\"5932\",\"description\":\"Antique Shops\",\"parentCode\":\"C10\"}"
}
],
"label": "Culture, Amusement & Pets",
@ -1055,6 +1074,12 @@
"label": "Recreation Services - Not Elsewhere Classified",
"mccCode": "7999",
"value": "{\"category\":\"SERVICE\",\"code\":\"7999\",\"description\":\"Recreation Services - Not Elsewhere Classified\",\"parentCode\":\"D01\"}"
},
{
"children": [],
"label": "Betting (including Lottery Tickets, Casino Gaming Chips, Off-track Betting and Wagers at Race Tracks)",
"mccCode": "7995",
"value": "{\"category\":\"SERVICE\",\"code\":\"7995\",\"description\":\"Betting (including Lottery Tickets, Casino Gaming Chips, Off-track Betting and Wagers at Race Tracks)\",\"parentCode\":\"D01\"}"
}
],
"label": "Entertainment & Tickets Services",
@ -1295,6 +1320,24 @@
"label": "Membership Organizations - Not Elsewhere Classified",
"mccCode": "8699",
"value": "{\"category\":\"OTHER\",\"code\":\"8699\",\"description\":\"Membership Organizations - Not Elsewhere Classified\",\"parentCode\":\"P03\"}"
},
{
"children": [],
"label": "Religious Organizations",
"mccCode": "8661",
"value": "{\"category\":\"OTHER\",\"code\":\"8661\",\"description\":\"Religious Organization\",\"parentCode\":\"P03\"}"
},
{
"children": [],
"label": "Political Organizations",
"mccCode": "8651",
"value": "{\"category\":\"OTHER\",\"code\":\"8651\",\"description\":\"Political Organizations\",\"parentCode\":\"P03\"}"
},
{
"children": [],
"label": "Charitable and Social Service Organizations",
"mccCode": "8398",
"value": "{\"category\":\"OTHER\",\"code\":\"8398\",\"description\":\"Charitable and Social Service Organizations\",\"parentCode\":\"P03\"}"
}
],
"label": "Associations",
@ -1337,6 +1380,49 @@
"label": "Professional Consulting",
"mccCode": "P04",
"value": "Professional Consulting"
},
{
"children": [
{
"children": [],
"label": "Postal Services Government Only",
"mccCode": "9402",
"value": "{\"category\":\"SERVICE\",\"code\":\"9402\",\"description\":\"Postal Services Government Only\",\"parentCode\":\"P05\"}"
},
{
"children": [],
"label": "Government Services ( Not Elsewhere Classified)",
"mccCode": "9399",
"value": "{\"category\":\"SERVICE\",\"code\":\"9399\",\"description\":\"Government Services ( Not Elsewhere Classified)\",\"parentCode\":\"P05\"}"
},
{
"children": [],
"label": "Tax Payments",
"mccCode": "9311",
"value": "{\"category\":\"SERVICE\",\"code\":\"9311\",\"description\":\"Tax Payments\",\"parentCode\":\"P05\"}"
},
{
"children": [],
"label": "Bail and Bond Payments",
"mccCode": "9223",
"value": "{\"category\":\"SERVICE\",\"code\":\"9223\",\"description\":\"Bail and Bond Payments\",\"parentCode\":\"P05\"}"
},
{
"children": [],
"label": "Fines",
"mccCode": "9222",
"value": "{\"category\":\"SERVICE\",\"code\":\"9222\",\"description\":\"Fines\",\"parentCode\":\"P05\"}"
},
{
"children": [],
"label": "Court Costs, including Alimony and Child Support",
"mccCode": "9211",
"value": "{\"category\":\"SERVICE\",\"code\":\"9211\",\"description\":\"Court Costs, including Alimony and Child Support\",\"parentCode\":\"P05\"}"
}
],
"label": "Government Services",
"mccCode": "P05",
"value": "Government Services"
}
],
"label": "Professional Services",
@ -1467,6 +1553,12 @@
"label": "Direct Marketing - Not Elsewhere Classified",
"mccCode": "5969",
"value": "{\"category\":\"OTHER\",\"code\":\"5969\",\"description\":\"Direct Marketing - Not Elsewhere Classified\",\"parentCode\":\"S03\"}"
},
{
"children": [],
"label": "Direct Marketing- Insurance Service",
"mccCode": "5960",
"value": "{\"category\":\"OTHER\",\"code\":\"5960\",\"description\":\"Direct Marketing- Insurance Service\",\"parentCode\":\"S03\"}"
}
],
"label": "Direct Marketing",
@ -1570,6 +1662,18 @@
"label": "Business Services Not Elsewhere Classified",
"mccCode": "7399",
"value": "{\"category\":\"SERVICE\",\"code\":\"7399\",\"description\":\"Business Services Not Elsewhere Classified\",\"parentCode\":\"S05\"}"
},
{
"children": [],
"label": "Debt Collection Agencies",
"mccCode": "7322",
"value": "{\"category\":\"SERVICE\",\"code\":\"7322\",\"description\":\"Debt Collection Agencies\",\"parentCode\":\"S05\"}"
},
{
"children": [],
"label": "Consumer Credit Reporting Agencies",
"mccCode": "7321",
"value": "{\"category\":\"SERVICE\",\"code\":\"7321\",\"description\":\"Consumer Credit Reporting Agencies\",\"parentCode\":\"S05\"}"
}
],
"label": "Business Services",
@ -1690,20 +1794,32 @@
},
{
"children": [],
"label": "Personal Services - Not Elsewhere Classified",
"label": "Miscellaneous Personal Services ( not elsewhere classifies)",
"mccCode": "7299",
"value": "{\"category\":\"SERVICE\",\"code\":\"7299\",\"description\":\"Personal Services - Not Elsewhere Classified\",\"parentCode\":\"S08\"}"
"value": "{\"category\":\"SERVICE\",\"code\":\"7299\",\"description\":\"Miscellaneous Personal Services ( not elsewhere classifies)\",\"parentCode\":\"S08\"}"
},
{
"children": [],
"label": "Truck Stops",
"mccCode": "7511",
"value": "{\"category\":\"OTHER\",\"code\":\"7511\",\"description\":\"Truck Stops\",\"parentCode\":\"S08\"}"
"value": "{\"category\":\"SERVICE\",\"code\":\"7511\",\"description\":\"Truck Stops\",\"parentCode\":\"S08\"}"
},
{
"children": [],
"label": "Counselling Service Debt, Marriage, Personal",
"mccCode": "7277",
"value": "{\"category\":\"SERVICE\",\"code\":\"7277\",\"description\":\"Counselling Service Debt, Marriage, Personal\",\"parentCode\":\"S08\"}"
},
{
"children": [],
"label": "Tax Preparation Service",
"mccCode": "7276",
"value": "{\"category\":\"SERVICE\",\"code\":\"7276\",\"description\":\"Tax Preparation Service\",\"parentCode\":\"S08\"}"
}
],
"label": "Personal Services",
"label": "Miscellaneous Services",
"mccCode": "S08",
"value": "Personal Services"
"value": "Miscellaneous Services"
},
{
"children": [
@ -1820,7 +1936,63 @@
"label": "Automobile Rental & Services",
"mccCode": "S10",
"value": "Automobile Rental & Services"
},
{
"children": [
{
"children": [],
"label": "Money Orders Wire Transfer",
"mccCode": "4829",
"value": "{\"category\":\"SERVICE\",\"code\":\"4829\",\"description\":\"Money Orders Wire Transfer\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Pawn Shops and Salvage Yards",
"mccCode": "5933",
"value": "{\"category\":\"SERVICE\",\"code\":\"5933\",\"description\":\"Pawn Shops and Salvage Yards\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "nsurance Sales, Underwriting, and Premiums",
"mccCode": "6300",
"value": "{\"category\":\"SERVICE\",\"code\":\"6300\",\"description\":\"nsurance Sales, Underwriting, and Premiums\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Security Brokers/Dealers",
"mccCode": "6211",
"value": "{\"category\":\"SERVICE\",\"code\":\"6211\",\"description\":\"Security Brokers/Dealers\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Non-Financial Institutions Foreign Currency, Money Orders (not wire transfer) and Travelers Cheques",
"mccCode": "6051",
"value": "{\"category\":\"SERVICE\",\"code\":\"6051\",\"description\":\"Non-Financial Institutions Foreign Currency, Money Orders (not wire transfer) and Travelers Cheques\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Financial Institutions Merchandise and Services",
"mccCode": "6012",
"value": "{\"category\":\"SERVICE\",\"code\":\"6012\",\"description\":\"Financial Institutions Merchandise and Services\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Financial Institutions Automated Cash Disbursements",
"mccCode": "6011",
"value": "{\"category\":\"SERVICE\",\"code\":\"6011\",\"description\":\"Financial Institutions Automated Cash Disbursements\",\"parentCode\":\"S11\"}"
},
{
"children": [],
"label": "Financial Institutions Manual Cash Disbursements",
"mccCode": "6010",
"value": "{\"category\":\"SERVICE\",\"code\":\"6010\",\"description\":\"Financial Institutions Manual Cash Disbursements\",\"parentCode\":\"S11\"}"
}
],
"label": "Financial Services",
"mccCode": "S11",
"value": "Financial Services"
}
],
"label": "Business & Miscellaneous Services",
"mccCode": "S",

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="200px" height="80px" viewBox="0 0 200 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>A+Partner-200X80-竖版</title>
<g id="A+Partner-200X80-竖版" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="IA+Partner-200X80-竖版">
<rect id="矩形" x="0" y="0" width="200" height="80"></rect>
<g id="编组-3" transform="translate(2.500000, 2.500000)">
<path d="M97.7444542,29.1648069 C97.7444542,28.4221226 97.8929911,27.6794383 98.4880387,27.0843907 C99.4278719,26.1436573 101.259827,25.4513855 105.468371,24.4602395 L105.468371,30.7978121 C103.389755,31.9374949 102.20146,32.3831055 100.815116,32.3831055 C98.9327491,32.3831055 97.7444542,31.1452984 97.7444542,29.1648069 L97.7444542,29.1648069 Z M74.6690283,16.2412001 C77.5911534,16.2412001 79.919131,18.5682775 79.919131,23.5195061 C79.919131,29.8588792 76.5018831,32.6801792 72.6894371,32.6801792 C71.7982159,32.6801792 70.9556069,32.5811547 70.0157736,32.2840809 L70.0157736,17.9246178 C71.6496791,16.7858352 72.9865108,16.2412001 74.6690283,16.2412001 L74.6690283,16.2412001 Z M141.17033,10.7453363 L141.220742,10.6958241 L133.841611,10.6958241 L129.187456,26.8377295 L128.938995,26.8377295 L123.592568,10.6958241 L114.827993,10.6958241 L125.37411,37.3352343 L120.968417,45.4561494 L120.968417,45.6532984 L127.849724,45.6532984 L141.17033,10.7453363 Z M49.1197885,37.2362098 L56.9427297,37.2362098 L56.9427297,10.6958241 L49.1197885,10.6958241 L49.1197885,37.2362098 Z M106.410004,37.2362098 L114.233846,37.2362098 L113.292212,30.6015634 L113.292212,19.5090109 C113.292212,13.4676118 109.728228,10.1502887 103.439267,10.1502887 C99.4278719,10.1502887 96.6551839,10.8443609 91.6049308,12.3792418 L92.9912748,18.4692529 C97.5968176,16.3897369 99.6268213,15.4985158 101.754949,15.4985158 C104.330488,15.4985158 105.468371,17.3304704 105.468371,20.1535709 L105.468371,20.3507198 C96.5066471,22.0341375 93.7348593,22.9757712 92.001029,24.707801 C90.7128094,25.9960206 90.1690745,27.8279752 90.1690745,29.9570035 C90.1690745,35.056769 94.1300573,37.7799447 97.8434788,37.7799447 C100.616167,37.7799447 102.84422,36.7410869 105.865369,34.4635217 L106.410004,37.2362098 Z M74.5718042,37.5827958 C81.5530365,37.5827958 87.841997,32.4326178 87.841997,23.2719447 C87.841997,15.052005 83.2859665,10.1502887 77.6406657,10.1502887 C74.7698533,10.1502887 72.5409002,11.239559 70.0157736,13.3199752 L70.0157736,10.6958241 L62.1919322,10.6958241 L62.1919322,45.6532984 L70.0157736,45.6532984 L70.0157736,36.9886483 C71.5020424,37.3838464 72.8874862,37.5827958 74.5718042,37.5827958 L74.5718042,37.5827958 Z M10.8440908,24.707801 L15.4991459,8.61540782 L15.6962949,8.61540782 L20.1037885,24.707801 L10.8440908,24.707801 Z M0,37.2362098 L7.22969397,37.2362098 L9.20928518,30.4026141 L21.6386694,30.4026141 L23.519236,37.2362098 L32.7789337,37.2362098 L22.2319166,2.32644728 L11.735312,2.32644728 L0,37.2362098 Z M35.9486203,37.2362098 L43.7715614,37.2362098 L43.7715614,1.08954036 L35.9486203,1.08954036 L35.9486203,37.2362098 Z" id="Fill-7726" fill="#3F3A39"></path>
<path d="M48.5258211,4.30756888 C48.5258211,6.88220774 50.4081882,8.61513775 53.0323394,8.61513775 C55.6564905,8.61513775 57.5370572,6.88220774 57.5370572,4.30756888 C57.5370572,1.78244229 55.6564905,0 53.0323394,0 C50.4081882,0 48.5258211,1.78244229 48.5258211,4.30756888" id="Fill-7728" fill="#0075FF"></path>
<path d="M194.630095,27.7094158 L176.867788,27.7094158 C171.976874,27.7094158 168.014091,23.744832 168.014091,18.8566191 L190.356735,18.8566191 C192.717121,18.8566191 194.630095,20.7695937 194.630095,23.1299794 L194.630095,27.7094158 Z" id="Fill-7730" fill="#0075FF"></path>
<path d="M163.709583,27.7094158 L154.524604,27.7094158 C152.164218,27.7094158 150.251243,25.7955409 150.251243,23.4351552 L150.251243,18.8566191 L163.709583,18.8566191 L163.709583,27.7094158 Z" id="Fill-7732" fill="#00B7FF"></path>
<path d="M168.013731,18.856169 L168.013731,1.09296121 L172.594067,1.09296121 C174.954453,1.09296121 176.866527,3.00683611 176.866527,5.36632159 L176.866527,27.7089657 C171.977414,27.7089657 168.013731,23.7452821 168.013731,18.856169" id="Fill-7734" fill="#0075FF"></path>
<path d="M168.013731,41.198723 L168.013731,32.0524535 L176.866527,32.0524535 L176.866527,45.4720834 L172.287091,45.4720834 C169.926705,45.4720834 168.013731,43.5591087 168.013731,41.198723" id="Fill-7736" fill="#00B7FF"></path>
<path d="M6.71287573,58.5978804 L6.71287573,66.1399519 L11.5911862,66.1399519 C12.7812815,66.1399519 13.7454208,65.8257739 14.4836039,65.1947173 C15.2190864,64.5636608 15.5890783,63.617526 15.5890783,62.3554128 C15.5890783,61.0941999 15.2190864,60.1534664 14.4836039,59.5296116 C13.7454208,58.9084575 12.7812815,58.5978804 11.5911862,58.5978804 L6.71287573,58.5978804 Z M11.751426,56.7857308 C12.6030373,56.7857308 13.3889323,56.9180636 14.109111,57.1854299 C14.8301899,57.4518961 15.4504439,57.8245885 15.9752741,58.3044076 C16.4992041,58.7851269 16.9034044,59.3666712 17.187875,60.050841 C17.4723456,60.7350107 17.6145809,61.5038015 17.6145809,62.3554128 C17.6145809,63.2088246 17.4723456,63.9776153 17.187875,64.6617851 C16.9034044,65.3459549 16.4992041,65.9320003 15.9752741,66.4208216 C15.4504439,66.9096429 14.8301899,67.2868365 14.109111,67.5533026 C13.3889323,67.8197687 12.6030373,67.9530018 11.751426,67.9530018 L6.71287573,67.9530018 L6.71287573,75.7624396 L4.6864729,75.7624396 L4.6864729,56.7857308 L11.751426,56.7857308 Z" id="Fill-7738" fill="#3F3A39"></path>
<path d="M34.2733946,69.7126684 L41.3365472,69.7126684 L37.817574,59.6634748 L34.2733946,69.7126684 Z M45.6270118,75.7621695 L43.4691764,75.7621695 L41.9495993,71.4726051 L33.6594422,71.4726051 L32.1407654,75.7621695 L29.9820297,75.7621695 L36.9650625,56.7863609 L38.6709858,56.7863609 L45.6270118,75.7621695 Z" id="Fill-7740" fill="#3F3A39"></path>
<path d="M62.9786375,58.5978804 L62.9786375,65.5548067 L68.0432942,65.5548067 C69.1622719,65.5548067 70.0732979,65.2712363 70.7754722,64.7013949 C71.4767462,64.1324538 71.8269331,63.2619378 71.8269331,62.0889467 C71.8269331,60.9159556 71.4767462,60.0409385 70.7754722,59.4638953 C70.0732979,58.8868521 69.1622719,58.5978804 68.0432942,58.5978804 L62.9786375,58.5978804 Z M68.2287402,56.7857308 C69.0470433,56.7857308 69.8023307,56.9045602 70.4955027,57.1458201 C71.1886747,57.3852795 71.7828221,57.7318655 72.2815459,58.1846779 C72.7784692,58.6383905 73.164665,59.1938283 73.4401334,59.8509914 C73.7165019,60.5081544 73.8533359,61.2454374 73.8533359,62.0628402 C73.8533359,63.4491842 73.470741,64.580765 72.7073515,65.4611835 C71.9430619,66.3407017 70.948315,66.9051418 69.7222108,67.1536034 L74.2260284,75.7624396 L71.85484,75.7624396 L67.5364684,67.3408499 L62.9786375,67.3408499 L62.9786375,75.7624396 L60.9531348,75.7624396 L60.9531348,56.7857308 L68.2287402,56.7857308 Z" id="Fill-7742" fill="#3F3A39"></path>
<polygon id="Fill-7744" fill="#3F3A39" points="101.120292 58.5978804 95.6289293 58.5978804 95.6289293 75.7624396 93.6043269 75.7624396 93.6043269 58.5978804 88.1129643 58.5978804 88.1129643 56.7857308 101.120292 56.7857308"></polygon>
<polygon id="Fill-7746" fill="#3F3A39" points="130.945503 75.7623496 129.026226 75.7623496 118.951827 60.5431731 118.951827 75.7623496 116.926324 75.7623496 116.926324 56.7856407 118.8456 56.7856407 128.92 71.951704 128.92 56.7856407 130.945503 56.7856407"></polygon>
<polygon id="Fill-7748" fill="#3F3A39" points="160.477871 58.5978804 150.72215 58.5978804 150.72215 65.2883406 159.038414 65.2883406 159.038414 67.09959 150.72215 67.09959 150.72215 73.9502899 160.477871 73.9502899 160.477871 75.7624396 148.696647 75.7624396 148.696647 56.7857308 160.477871 56.7857308"></polygon>
<path d="M178.974671,58.5978804 L178.974671,65.5548067 L184.039327,65.5548067 C185.158305,65.5548067 186.069331,65.2712363 186.771505,64.7013949 C187.472779,64.1324538 187.823866,63.2619378 187.823866,62.0889467 C187.823866,60.9159556 187.472779,60.0409385 186.771505,59.4638953 C186.069331,58.8868521 185.158305,58.5978804 184.039327,58.5978804 L178.974671,58.5978804 Z M184.225674,56.7857308 C185.043076,56.7857308 185.798364,56.9045602 186.491536,57.1458201 C187.184708,57.3852795 187.779755,57.7318655 188.277579,58.1846779 C188.774502,58.6383905 189.160698,59.1938283 189.436166,59.8509914 C189.712535,60.5081544 189.849369,61.2454374 189.849369,62.0628402 C189.849369,63.4491842 189.466774,64.580765 188.703385,65.4611835 C187.939095,66.3407017 186.944348,66.9051418 185.718244,67.1536034 L190.222062,75.7624396 L187.850873,75.7624396 L183.532502,67.3408499 L178.974671,67.3408499 L178.974671,75.7624396 L176.949168,75.7624396 L176.949168,56.7857308 L184.225674,56.7857308 Z" id="Fill-7750" fill="#3F3A39"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -525,6 +525,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
$scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person;
$scope.partner.legal_representative_id = $scope.partner.representativeInfo.legal_representative_id;
$scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone;
$scope.partner.legal_representative_email = $scope.partner.representativeInfo.email;
$scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title;

File diff suppressed because it is too large Load Diff

@ -435,6 +435,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
$scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person;
$scope.partner.legal_representative_id = $scope.partner.representativeInfo.legal_representative_id;
$scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone;
$scope.partner.legal_representative_email = $scope.partner.representativeInfo.email;
$scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title;

@ -854,6 +854,22 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_id.$invalid && partnerForm.legal_representative_id.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_id-input">
Representative ID</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.legal_representative_id"
name="legal_representative_person"
id="legal_representative_id-input" maxlength="50">
<div ng-messages="partnerForm.legal_representative_id.$error"
ng-if="partnerForm.legal_representative_id.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_phone_p.$invalid && partnerForm.legal_representative_phone_p.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_phone_p-input">*

@ -712,6 +712,24 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_id.$invalid && partnerForm.legal_representative_id.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_id-input">
Representative ID</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.legal_representative_id"
name="legal_representative_id"
id="legal_representative_id-input" maxlength="50">
<div ng-messages="partnerForm.legal_representative_id.$error"
ng-if="partnerForm.legal_representative_id.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 50
</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_phone_p.$invalid && partnerForm.legal_representative_phone_p.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_phone_p-input">*

@ -0,0 +1,285 @@
<div class="content">
<form novalidate name="subForm">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading" > {{title}}</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':subForm.merchantDisplayName.$invalid && subForm.merchant_storename.$dirty}">
<label class="control-label col-sm-4" for="merchantDisplayName_input">Merchant DisplayName</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.merchantDisplayName"
type="text" name="merchantDisplayName" id="merchantDisplayName_input" required maxlength="64">
<div ng-messages="subForm.merchantDisplayName.$error" ng-if="subForm.merchantDisplayName.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 64</p>
</div>
</div>
</div>
<!--<div class="form-group"-->
<!--ng-class="{'has-error':subForm.merchant_name.$invalid && subForm.merchant_name.$dirty}">-->
<!--<label class="control-label col-sm-4">* Payment Type</label>-->
<!--<div class="col-sm-8">-->
<!--<span class="checkbox-inline">-->
<!--<input type="checkbox" ng-model="subMerchantInfo.payment_type_online"> <p>Online Payment</p>-->
<!--</span>-->
<!--<span class="checkbox-inline">-->
<!--<input type="checkbox" ng-model="subMerchantInfo.business_type_offline"><p>Offline Payment</p>-->
<!--</span>-->
<!--<span class="checkbox-inline">-->
<!--<input type="checkbox" ng-model="subMerchantInfo.business_type_agreement"><p>Agreement Payment</p>-->
<!--</span>-->
<!--</div>-->
<!--</div>-->
<div class="form-group"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-4"
for="alipay_category">* Merchant MCC</label>
<div class="col-sm-8" >
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="subMerchantInfo.alipayindustry|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)"
chose-one-level="false">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="subMerchantInfo.online"
ng-class="{'has-error':subForm.websites.$invalid && subForm.websites.$dirty}">
<label class="control-label col-sm-4" for="websites_input">* Web site</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.website"
type="text" name="websites" id="websites_input" required maxlength="1000">
<div ng-messages="subForm.websites.$error" ng-if="subForm.websites.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 1000</p>
</div>
</div>
</div>
<div class="form-group" ng-if="subMerchantInfo.online"
ng-class="{'has-error':subForm.websiteType.$invalid && subForm.websiteType.$dirty}">
<label class="control-label col-sm-4">* WebsiteType</label>
<div class="col-sm-8">
<div class="radio-inline">
<input type="radio" name="websiteType" value="WEB" ng-model="subMerchantInfo.websiteType"/>
<label>Web</label>
</div>
<div class="radio-inline">
<input type="radio" name="websiteType" value="APP" ng-model="subMerchantInfo.websiteType"/>
<label>App</label>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.legalName.$invalid && subForm.legalName.$dirty}">
<label class="control-label col-sm-4" for="legalName_input">* Legal Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.legalName"
type="text" name="legalName" id="legalName_input" required maxlength="256">
<div ng-messages="subForm.legalName.$error" ng-if="subForm.legalName.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.registrationType.$invalid && subForm.registrationType.$dirty}">
<label class="control-label col-sm-4">* Registration Type</label>
<div class="col-sm-8">
<div class="radio-inline">
<input type="radio" name="registrationType" value="US_FEDERAL_EIN" ng-model="subMerchantInfo.registrationType"/>
<label> (Employer Identification Number) EIN of US merchant.</label>
</div>
<div class="radio-inline">
<input type="radio" name="registrationType" value="ENTERPRISE_REGISTRATION_NO" ng-model="subMerchantInfo.registrationType"/>
<label>Merchant registration ID.</label>
</div>
<div class="radio-inline">
<input type="radio" name="registrationType" value="INDEPENDENT_CONTRACTOR_LICENSE_NO" ng-model="subMerchantInfo.registrationType"/>
<label>The license number of ride-share driver or taxi driver.</label>
</div>
<div class="radio-inline">
<input type="radio" name="registrationType" value="OTHER_IDENTIFICATION_NO" ng-model="subMerchantInfo.registrationType"/>
<label>Other registration type. </label>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.registrationNo.$invalid && subForm.registrationNo.$dirty}">
<label class="control-label col-sm-4" for="registrationNo_input">* Registration No</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.registrationNo"
type="text" name="registrationNo" id="registrationNo_input" required maxlength="64">
<div ng-messages="subForm.registrationNo.$error" ng-if="subForm.registrationNo.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 64</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.registrationAddress.$invalid && subForm.registrationAddress.$dirty}">
<label class="control-label col-sm-4" for="registrationAddress_input">* Registration Address</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.registrationAddress"
type="text" name="registrationAddress" id="registrationAddress_input" required maxlength="256">
<div ng-messages="subForm.registrationAddress.$error" ng-if="subForm.registrationAddress.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
</div>
</div>
</div>
<!-- 店铺名称 -->
<div class="form-group" ng-if="!subMerchantInfo.online"
ng-class="{'has-error':subForm.storeName.$invalid && subForm.storeName.$dirty}">
<label class="control-label col-sm-4" for="storeName_input">* Store Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.storeName"
type="text" name="storeName" id="storeName_input" required maxlength="256">
<div ng-messages="subForm.storeName.$error" ng-if="subForm.storeName.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
</div>
</div>
</div>
<!-- 店铺MCC -->
<div class="form-group" ng-if="!subMerchantInfo.online"
ng-class="{'has-error':partnerForm.storeMCC.$invalid && partnerForm.storeMCC.$dirty}">
<label class="control-label col-sm-4"
for="storeMCC">*Store MCC</label>
<div class="col-sm-8" >
<input class="form-control" id="storeMCC" required
name="storeMCC" readonly
ng-model="subMerchantInfo.storeMCC|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayStoreMccSelect($selected)"
chose-one-level="false">
<div ng-messages="partnerForm.storeMCC.$error"
ng-if="partnerForm.storeMCC.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<!-- 商店地址-->
<div class="form-group" ng-if="!subMerchantInfo.online"
ng-class="{'has-error':subForm.storeAddress.$invalid && subForm.storeAddress.$dirty}">
<label class="control-label col-sm-4" for="storeAddress_input">* Store Address</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.storeAddress"
type="text" name="storeAddress" id="storeAddress_input" maxlength="256" required>
<div ng-messages="subForm.storeAddress.$error" ng-if="subForm.storeAddress.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 256</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':subForm.businessType.$invalid && subForm.businessType.$dirty}">
<label class="control-label col-sm-4"
for="businessType_select">* Business Type</label>
<div class="col-sm-8">
<select class="form-control" ng-model="subMerchantInfo.businessType"
id="businessType_select"
name="businessType" required>
<option value="">Please Choose</option>
<option value="ENTERPRISE" >ENTERPRISE</option>
<option value="INDIVIDUAL">INDIVIDUAL</option>
</select>
<div ng-messages="subForm.businessType.$error" ng-if="subForm.businessType.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<!--ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"-->
<div class="form-group" ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"
ng-class="{'has-error':subForm.shareholderName.$invalid && subForm.shareholderName.$dirty}">
<label class="control-label col-sm-4" for="shareholderName_input">Shareholder Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.shareholderName"
type="text" name="shareholderName" id="shareholderName_input" maxlength="128">
<div ng-messages="subForm.shareholderName.$error" ng-if="subForm.shareholderName.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<div class="form-group" ng-if="subMerchantInfo.businessType == 'ENTERPRISE'"
ng-class="{'has-error':subForm.shareholderId.$invalid && subForm.shareholderId.$dirty}">
<label class="control-label col-sm-4" for="shareholderId_input">Shareholder Id</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.shareholderId"
type="text" name="shareholderId" id="shareholderId_input" maxlength="128">
<div ng-messages="subForm.shareholderId.$error" ng-if="subForm.shareholderId.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<div class="form-group" ng-if="subMerchantInfo.businessType == 'INDIVIDUAL'"
ng-class="{'has-error':subForm.representativeName.$invalid && subForm.representativeName.$dirty}">
<label class="control-label col-sm-4" for="representativeName_input">Representative Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.representativeName"
type="text" name="representativeName" id="representativeName_input" maxlength="128">
<div ng-messages="subForm.representativeName.$error" ng-if="subForm.representativeName.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
<div class="form-group" ng-if="subMerchantInfo.businessType == 'INDIVIDUAL'"
ng-class="{'has-error':subForm.representativeId.$invalid && subForm.representativeId.$dirty}">
<label class="control-label col-sm-4" for="representativeId_input">Representative Id</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.representativeId"
type="text" name="representativeId" id="representativeId_input" maxlength="128">
<div ng-messages="subForm.representativeId.$error" ng-if="subForm.representativeId.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Length is more than 128</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button"
ng-click="saveAlipayApply(subForm)">Submit
</button>
</div>
</div>
</div>
</form>
</div>

@ -421,6 +421,13 @@
<p class="form-control-static" ng-bind="partner.representativeInfo.representative_person"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Representative ID</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.representativeInfo.legal_representative_id"></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Wechat ID</label>

@ -458,6 +458,24 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_id.$invalid && partnerForm.legal_representative_id.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_id-input">
Representative ID</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.legal_representative_id"
name="legal_representative_id"
id="legal_representative_id-input" maxlength="50">
<div ng-messages="partnerForm.legal_representative_id.$error"
ng-if="partnerForm.legal_representative_id.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 50
</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_phone.$invalid && partnerForm.legal_representative_phone.$dirty}">

@ -67,7 +67,7 @@
</p>
<p class="col-md-12">
<a ng-href="/client/partner_info/qrcode_board/aggregate?currency={{qrConfig.currency}}&preauth={{qrConfig.preauth==true}}&qrcode={{qrConfig.qrcode==true}}&customerrate={{qrConfig.customerrate==true}}"
target="_blank"><i class="fa fa-download"></i>Download Aggregate QR Board Image (聚合支付水晶立牌:支持支付宝、微信、翼支付)
target="_blank"><i class="fa fa-download"></i>Download Aggregate QR Board Image (聚合支付水晶立牌:支持支付宝、微信、A+)
</a>
</p>
</div>

@ -8,7 +8,7 @@
<div class="col-sm-12">
<h3>Bank Account
<a class="small" role="button" ng-click="bankCtrl.edit=true"
ng-if="!bankCtrl.edit && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))">
ng-if="!bankCtrl.edit && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))">
<i class="fa fa-edit"></i>
</a>
</h3>
@ -17,16 +17,16 @@
<div class="form-group" ng-if="partner.surcharge_mode=='distributed'">
<label class="col-sm-4">手续费账户余额</label>
<div class="col-sm-6" style="font-size: 25px">
<p>{{surcharge.balance|currency:'AUD'}}<i class="fa fa-bars"
style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px"
ng-click="surchargeAccountDetail()"></i></p>
<p>{{surcharge.balance | currency:'AUD'}}<i class="fa fa-bars"
style="font-size: 15px;color: #3c8dbc;cursor: pointer;padding-left: 15px"
ng-click="surchargeAccountDetail()"></i></p>
</div>
</div>
<div class="form-group" ng-if="partner.surcharge_mode=='distributed'">
<label class="col-sm-4">允许手续费账户欠款</label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.allow_surcharge_credit" bs-switch
switch-change="allowSurchargeCredit(partner.allow_surcharge_credit)">
switch-change="allowSurchargeCredit(partner.allow_surcharge_credit)">
</div>
</div>
<div class="form-group">
@ -35,11 +35,11 @@
<p>
<span ng-if="partner.surcharge_mode=='balance'">balance
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer"
ng-click="switchSurchargeMode()"></i>
ng-click="switchSurchargeMode()"></i>
</span>
<span ng-if="partner.surcharge_mode=='distributed'">distributed
<i class="fa fa-sort" style="color: #3c8dbc;cursor: pointer"
ng-click="switchSurchargeMode()"></i>
ng-click="switchSurchargeMode()"></i>
</span>
<p class="text-info">
<i class="fa fa-info"></i>启用到收支分离(distributed)模式,将使消费者支付手续费模式失效<br>
@ -52,41 +52,41 @@
<label class="col-sm-4">RoyalPay Pay GST</label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.tax_in_surcharge" bs-switch
switch-change="taxInSurcharge(partner.tax_in_surcharge)">
switch-change="taxInSurcharge(partner.tax_in_surcharge)">
</div>
</div>
<div class="form-group" ng-if="('10'|withRole)">
<label class="col-sm-4">Merchant Pay GST &ensp;<small><em>(消费者承担手续费时生效)</em></small></label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.customer_tax_free" bs-switch
switch-change="customerTaxFree(partner.customer_tax_free)">
switch-change="customerTaxFree(partner.customer_tax_free)">
</div>
</div>
<div class="form-group" ng-if="'modify_skip_clear'|withFunc">
<label class="col-sm-4">Skip Clearing</label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.skip_clearing" bs-switch
switch-change="skipClearing(partner.skip_clearing)">
switch-change="skipClearing(partner.skip_clearing)">
</div>
</div>
<div class="form-group" ng-if="'modify_skip_clear'|withFunc">
<label class="col-sm-4">Pre Settle</label>
<div class="col-sm-6">
<input type="checkbox" ng-model="partner.enable_presettle" bs-switch
switch-change="switchPreSettle(partner.enable_presettle)">
switch-change="switchPreSettle(partner.enable_presettle)">
</div>
</div>
<div class="form-group" ng-if="'modify_min_settle'|withFunc">
<label class="col-sm-4" for="minSettleEdit">Min Settle</label>
<div class="col-sm-6">
<p ng-if="!bankCtrl.modify_min_settle" class="form-control-static">
<span ng-if="partner.min_settle">AU$</span>{{partner.min_settle||'Not Configure'}}
<span ng-if="partner.min_settle">AU$</span>{{partner.min_settle || 'Not Configure'}}
<a role="button" ng-click="bankCtrl.modify_min_settle=true"><i class="fa fa-edit"></i></a>
</p>
<div class="input-group" ng-if="bankCtrl.modify_min_settle">
<div class="input-group-addon">AU$</div>
<input class="form-control" ng-model="partner.min_settle" type="number" id="minSettleEdit"
min="0">
min="0">
<div class="input-group-btn">
<button class="btn btn-danger" ng-click="bankCtrl.modify_min_settle=false"><i
class="fa fa-close"></i>
@ -114,26 +114,26 @@
<label class="col-sm-4">Settle Hour</label>
<div class="col-sm-6">
<select ng-model="partner.settle_hour" class="form-control"
ng-options="hour.value as hour.label for hour in settleHours"
ng-change="settleHourConfig()"></select>
ng-options="hour.value as hour.label for hour in settleHours"
ng-change="settleHourConfig()"></select>
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="swiftcode_input">Swift Code</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.swift_code" id="swiftcode_input"
required ng-readonly="!bankCtrl.edit">
required ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="bsb_no_input">BSB No</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.bsb_no" id="bsb_no_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
<div class="col-sm-2" ng-if="bankCtrl.edit">
<a class="btn btn-success" role="button" ng-click="getBankInfo(bankaccount.bsb_no)"><i
@ -144,81 +144,81 @@
<label class="col-sm-4" for="bank_input">Bank</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.bank" id="bank_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="city_input">City</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.city" id="city_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="address_input">Address</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.address" id="address_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="system_input">System</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.system" id="system_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="postcode_input">Postcode</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.postcode" id="postcode_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="state_input">State</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.state" id="state_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="branch_input">Branch</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.branch" id="branch_input" required
ng-readonly="!bankCtrl.edit">
ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="account_no_input">Account No</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" ng-model="bankaccount.account_no" id="account_no_input"
required ng-readonly="!bankCtrl.edit">
required ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="form-group">
<label class="col-sm-4" for="account_name_input">Account Name</label>
<div class="col-sm-6">
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.bankAccount"></i>
ng-if="$root.complianceCheck.bankAccount"></i>
<input class="form-control bank-input" maxlength="50" ng-model="bankaccount.account_name"
id="account_name_input" required ng-readonly="!bankCtrl.edit">
id="account_name_input" required ng-readonly="!bankCtrl.edit">
</div>
</div>
<div class="btn-group">
@ -235,25 +235,26 @@
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">
<h3>Rates <a class="text-success" role="button"
ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))"
ng-click="newRate()">
<i class="fa fa-plus"></i></a>
</h3>
<div class="panel-heading" style="display: flex;justify-content: space-between">
<h3>China Wallets Rate</h3>
<a id="addRate" class="btn btn-info" style="margin-bottom: 10px;margin-top: 20px" type="button"
ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))"
ng-click="newRate()">
Add Rate
</a>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Wechat'}"><a role="button"
ng-click="bankCtrl.rate_name='Wechat'">Wechat</a>
ng-click="bankCtrl.rate_name='Wechat'">Wechat</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Alipay'}"><a role="button"
ng-click="bankCtrl.rate_name='Alipay'">Alipay(Retail)</a>
ng-click="bankCtrl.rate_name='Alipay'">Alipay(Retail)</a>
</li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayOnline'}"><a role="button"
ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a>
ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a>
</li>
<!-- <li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}"><a role="button"
ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a>
@ -263,137 +264,115 @@
</li>-->
<!--<li role="presentation" ng-class="{active:bankCtrl.rate_name=='hf'}"><a role="button" ng-click="bankCtrl.rate_name='hf'">HFpay</a></li>-->
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='Rpay'}"><a role="button"
ng-click="bankCtrl.rate_name='Rpay'">Rpay+</a>
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>
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>
<a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button"
ng-click="newCardPaymentRates()"
ng-if="(partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole)">
Add Card Payment Rates
</a>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</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' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'">
Clean Days
</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
<tr>
<th>Rate Name</th>
<th>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>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<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-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.rate + ' %/T+'+rate.ext_rates.overseas_rate_value.clean_days">
</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' || 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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="(bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd')
&& partner.upay_approve_result">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td>
</tr>
<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-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-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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- AlipayPlus费率设置 -->
<div class="row">
<div class="row" ng-if="false">
<div class="col-sm-12">
<h4>AlipayPlus Rates <a class="text-success" role="button"
ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4||(partner.approve_result==4&&partner.open_status==3)) && ('111'|withRole)))"
ng-click="newAlipayPlusRate()">
<i class="fa fa-plus"></i></a>
ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4||(partner.approve_result==4&&partner.open_status==3)) && ('111'|withRole)))"
ng-click="newAlipayPlusRate()">
<i class="fa fa-plus"></i></a>
</h4>
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:isAlipayCN}"><a role="button"
ng-click="changeAlipayPlusRateState(true)"
ng-if="sysconfig.active_channels.indexOf('AlipayPlus')!=-1">AlipayCN</a>
ng-click="changeAlipayPlusRateState(true)"
ng-if="sysconfig.active_channels.indexOf('AlipayPlus')!=-1">AlipayCN</a>
</li>
<li role="presentation" ng-class="{active:!isAlipayCN}"><a role="button"
ng-click="changeAlipayPlusRateState(false)">Other Wallets</a>
ng-click="changeAlipayPlusRateState(false)">Other
Wallets</a>
</li>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Rate Value</th>
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Clean Days</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
<tr>
<th>Rate Name</th>
<th>Rate Value</th>
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Clean Days</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rate in rates|filter:isAlipayPlus"
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-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>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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="(bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd')
<tr ng-repeat="rate in rates|filter:isAlipayPlus"
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-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>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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="(bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd')
&& partner.upay_approve_result">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td>
</tr>
</td>
</tr>
</tbody>
</table>
</div>
@ -404,4 +383,132 @@
</div>
</div>
</div>
<!-- card payment -->
<div class="panel-heading" style="display: flex;justify-content: space-between">
<h3>Card Payment Rate</h3>
<a id="addCardPaymentRate" class="btn btn-info" style="margin-top: 20px;margin-bottom: 10px" type="button"
ng-click="newCardPaymentRates()"
ng-if="((partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole))">
Add Card Payment Rates
</a>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:cardBankCtrl.rate_name=='rpaypmt_card'}"><a role="button"
ng-click="cardBankCtrl.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>-->
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Domestic Rate Value</th>
<th>International Rate Value</th>
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Clean Days</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rate in rates|filter:{rate_name:cardBankCtrl.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-bind="rate.ext_rates.overseas_rate_value.rate + ' %/T+'+rate.ext_rates.overseas_rate_value.clean_days">
</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>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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="partner.upay_approve_result">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- APS -->
<div class="panel-heading" style="display: flex;justify-content: space-between">
<h3>Alipay+ Rate</h3>
<a id="addAlipayApsInStoreRate" class="btn btn-info" style="margin-bottom: 10px;margin-top: 20px"
type="button"
ng-click="newAlipayApsRate(apsBankCtrl.rate_name)">
Add A+(APS) Rate
</a>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:apsBankCtrl.rate_name=='ApsInStore'}"><a
role="button"
ng-click="apsBankCtrl.rate_name='ApsInStore'">A+(Retail)</a>
</li>
<li role="presentation" ng-class="{active:apsBankCtrl.rate_name=='ApsCashier'}"><a
role="button"
ng-click="apsBankCtrl.rate_name='ApsCashier'">A+(Online)</a>
</li>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Interchange Fee</th>
<th>Service Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rate in rates|filter:{rate_name:apsBankCtrl.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-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-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>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

@ -1025,6 +1025,14 @@
ng-bind="partner.representativeInfo.representative_person "></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Representative ID</label>
<div class="col-sm-8">
<p class="form-control-static"
ng-bind="partner.representativeInfo.legal_representative_id "></p>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Wechat ID</label>

@ -795,6 +795,26 @@
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_id.$invalid && partnerForm.legal_representative_id.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_id-input">
Representative ID</label>
<div class="col-sm-8">
<div >
<input class="form-control" ng-model="partner.legal_representative_id"
name="legal_representative_id"
id="legal_representative_id-input" maxlength="50">
</div>
<div ng-messages="partnerForm.legal_representative_id.$error"
ng-if="partnerForm.legal_representative_id.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 50
</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.legal_representative_phone.$invalid && partnerForm.legal_representative_phone.$dirty}">
<label class="control-label col-sm-2" for="legal_representative_phone-input">* Phone</label>

@ -0,0 +1,152 @@
<div class="modal-header">
<h4>New Alipay+ APS Rate</h4>
</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">Clear Days</label>
<div class="col-sm-6">
<div class="input-group">
<select class="form-control" ng-model="rate.clean_days" id="citySelect" 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>
<!-- retail interchange fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.retail_interchange_fee_value.$invalid && rate_from.retail_interchange_fee_value.$dirty}">
<label class="control-label col-sm-4" for="retail_interchange_fee_value_input">Retail Interchange Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="retail_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_interchange_fee_value"
min="0.6" max="10" step="0.1" id="retail_interchange_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.retail_interchange_fee_value.$error" ng-if="rate_from.retail_interchange_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- retail service fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.retail_service_fee_value.$invalid && rate_from.retail_service_fee_value.$dirty}">
<label class="control-label col-sm-4" for="retail_service_fee_value_input">Retail Service Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="retail_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_service_fee_value"
min="0.6" max="10" step="0.1" id="retail_service_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.retail_service_fee_value.$error" ng-if="rate_from.retail_service_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- online interchange fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.online_interchange_fee_value.$invalid && rate_from.online_interchange_fee_value.$dirty}">
<label class="control-label col-sm-4" for="online_interchange_fee_value_input">Online Interchange Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="online_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_interchange_fee_value"
min="0.6" max="10" step="0.1" id="online_interchange_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.online_interchange_fee_value.$error" ng-if="rate_from.online_interchange_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- online service fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.online_service_fee_value.$invalid && rate_from.online_service_fee_value.$dirty}">
<label class="control-label col-sm-4" for="online_service_fee_value_input">Online Service Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="online_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_service_fee_value"
min="0.6" max="10" step="0.1" id="online_service_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.online_service_fee_value.$error" ng-if="rate_from.online_service_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</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>

@ -1,6 +1,6 @@
<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>
<!-- <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>

@ -144,24 +144,19 @@
ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYPLUS'}"
ng-click="params.channel='ALIPAYPLUS';loadTradeLogs(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JDpay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HFpay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='APSINSTORE'}"
ng-click="params.channel='APSINSTORE';loadTradeLogs(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='APSCASHIER'}"
ng-click="params.channel='APSCASHIER';loadTradeLogs(1)">Alipay+(Online)</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a>
</p>
</div>
</div>
@ -376,6 +371,8 @@
ng-if="trade.channel=='Alipay'" />
<img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline"
ng-if="trade.channel=='AlipayOnline'" />
<img src="/static/images/alipay_aps.jpg" style="height: 25px" uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsInStore'||trade.channel=='ApsCashier'" />
<img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'" />
<img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'" />
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+"

@ -108,28 +108,28 @@
<label class="col-sm-3 control-label">Max Order Amount</label>
<div class="col-sm-9">
<p ng-if="!ctrl.editMaxOrderAmount" class="form-control-static">
{{(paymentInfo.max_order_amount|currency:'AUD ')||'Not Configure'}}
{{(paymentInfo.max_order_amount | currency:'AUD ') || 'Not Configure'}}
<a role="button" ng-click="ctrl.editMaxOrderAmount=true"><i class="fa fa-edit"></i></a>
</p>
<div class="input-group" ng-if="ctrl.editMaxOrderAmount">
<div class="input-group-addon">AUD</div>
<input type="number" class="form-control" ng-model="paymentInfo.max_order_amount"
title="Max Order Amount">
title="Max Order Amount">
<div class="input-group-btn">
<button class="btn btn-success" title="Save"
ng-click="saveMaxOrderAmount(paymentInfo.max_order_amount)">
ng-click="saveMaxOrderAmount(paymentInfo.max_order_amount)">
<i class="fa fa-check"></i>
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-danger" title="Clear Limit"
ng-click="saveMaxOrderAmount(null)">
ng-click="saveMaxOrderAmount(null)">
<i class="fa fa-ban"></i>
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-danger" title="Cancel"
ng-click="ctrl.editMaxOrderAmount=false">
ng-click="ctrl.editMaxOrderAmount=false">
<i class="fa fa-remove"></i>
</button>
</div>
@ -140,19 +140,19 @@
<label class="col-sm-3 control-label">Customer Surcharge Rate</label>
<div class="col-sm-9">
<p ng-if="!ctrl.editCustomerSurchargeRate" class="form-control-static">
{{paymentInfo.customer_surcharge_rate||'Not Configure'}}
{{paymentInfo.customer_surcharge_rate || 'Not Configure'}}
<a role="button" ng-click="ctrl.editCustomerSurchargeRate=true"><i
class="fa fa-edit"></i></a>
</p>
<div class="input-group" ng-if="ctrl.editCustomerSurchargeRate">
<input type="number" class="form-control" ng-model="paymentInfo.customer_surcharge_rate"
title="Customer Surcharge Rate" max="{{paymentInfo.max_customer_surcharge_rate}}"
min="{{paymentInfo.min_customer_surcharge_rate}}" name="customer_surcharge_rate">
title="Customer Surcharge Rate" max="{{paymentInfo.max_customer_surcharge_rate}}"
min="{{paymentInfo.min_customer_surcharge_rate}}" name="customer_surcharge_rate">
<div class="input-group-addon">%</div>
<div class="input-group-btn">
<button class="btn btn-success" title="Save"
ng-click="saveCustomerSurchargeRate(paymentInfo.customer_surcharge_rate)">
ng-click="saveCustomerSurchargeRate(paymentInfo.customer_surcharge_rate)">
<i class="fa fa-check"></i>
</button>
</div>
@ -163,7 +163,7 @@
</div>
<div class="input-group-btn">
<button class="btn btn-danger" title="Cancel"
ng-click="ctrl.editCustomerSurchargeRate=false">
ng-click="ctrl.editCustomerSurchargeRate=false">
<i class="fa fa-remove"></i>
</button>
</div>
@ -178,16 +178,16 @@
<label class="col-sm-3 control-label">Order Expiry Config</label>
<div class="col-sm-9">
<p ng-if="!ctrl.editOrderExpiryConfig" class="form-control-static">
{{paymentInfo.order_expiry_config||'Not Configure'}}
{{paymentInfo.order_expiry_config || 'Not Configure'}}
<a role="button" ng-click="ctrl.editOrderExpiryConfig=true" ng-if="'01'|withRole"><i
class="fa fa-edit"></i></a>
</p>
<div class="input-group" ng-if="ctrl.editOrderExpiryConfig">
<input type="text" class="form-control" ng-model="paymentInfo.order_expiry_config"
title="Prevent not enough refund">
title="Prevent not enough refund">
<div class="input-group-btn">
<button class="btn btn-success"
ng-click="saveOrderExpiryConfig(paymentInfo.order_expiry_config)">
ng-click="saveOrderExpiryConfig(paymentInfo.order_expiry_config)">
<i class="fa fa-check"></i>
</button>
</div>
@ -218,21 +218,21 @@
<label class="col-xs-6 control-label">Alipay|支付宝</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch
ng-change="toggleChannel('alipay')">
ng-change="toggleChannel('alipay')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">WeChat|微信</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch
ng-change="toggleChannel('wechat')">
ng-change="toggleChannel('wechat')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">CB BankPay|快捷支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch
ng-change="toggleChannel('cb_bankpay')">
ng-change="toggleChannel('cb_bankpay')">
</div>
</div>
@ -240,21 +240,28 @@
<label class="col-xs-6 control-label">Card Payment|银行卡支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_card" bs-switch
ng-change="toggleChannel('rpaypmt_card')">
ng-change="toggleChannel('rpaypmt_card')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Direct Debit|银行账户支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_dd" bs-switch
ng-change="toggleChannel('rpaypmt_dd')">
ng-change="toggleChannel('rpaypmt_dd')">
</div>
</div>
<!-- <div class="form-group col-sm-4">-->
<!-- <label class="col-xs-6 control-label">Alipay+|支付宝</label>-->
<!-- <div class="col-xs-6">-->
<!-- <input type="checkbox" ng-model="paymentInfo.enable_alipayplus" bs-switch-->
<!-- ng-change="toggleChannel('alipayplus')">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Alipay+|支付宝</label>
<label class="col-xs-6 control-label">Alipay+(APS)</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipayplus" bs-switch
ng-change="toggleChannel('alipayplus')">
<input type="checkbox" ng-model="paymentInfo.enable_alipayaps" bs-switch
ng-change="toggleChannel('alipayaps')">
</div>
</div>
</div>
@ -274,7 +281,7 @@
<label class="col-sm-2 control-label">Customer Pay for Surcharge On QRCode</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.qrcode_surcharge" bs-switch
switch-change="updateClientQRCodePaySurCharge()">
switch-change="updateClientQRCodePaySurCharge()">
</div>
</div>
<div class="form-group">
@ -290,13 +297,13 @@
<input type="checkbox" ng-model="qrConfig.preauth" ng-change="reloadQRCode()">
Pre Authorization
<i class="fa fa-question-circle text-gray"
uib-tooltip="Pre Authorize means this bill will not be settled until completion"></i>
uib-tooltip="Pre Authorize means this bill will not be settled until completion"></i>
</label>
<label>
<input type="checkbox" ng-model="qrConfig.customerrate" ng-change="reloadQRCode()">
Customer Pay for Surcharge
<i class="fa fa-question-circle text-gray"
uib-tooltip="Customer pay for rate means after customer input the price, system will add rate value into the final price. Client will receive full value customer input after settlement. 客户支付费率勾选后将自动在输入金额基础上加上手续费金额,商户将在清算时收到用户输入的金额"></i>
uib-tooltip="Customer pay for rate means after customer input the price, system will add rate value into the final price. Client will receive full value customer input after settlement. 客户支付费率勾选后将自动在输入金额基础上加上手续费金额,商户将在清算时收到用户输入的金额"></i>
</label>
</p>
@ -327,7 +334,7 @@
</p>
<p>
<a ng-href="/sys/partners/{{partner.client_moniker}}/qrcode_board/aggregate?currency={{qrConfig.currency}}&preauth={{qrConfig.preauth==true}}&qrcode={{qrConfig.qrcode==true}}&customerrate={{qrConfig.customerrate==true}}"
download><i class="fa fa-download"></i> Download Aggregate QR Board Image
download><i class="fa fa-download"></i> Download Aggregate QR Board Image
(聚合支付水晶立牌:支持支付宝、微信、翼支付)</a>
</p>
</div>
@ -344,28 +351,28 @@
<label class="col-sm-2 control-label">Enable Socket</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_gateway" bs-switch
switch-change="toggleGateway()">
switch-change="toggleGateway()">
</div>
</div>
<div class="form-group" ng-if="'gateway_upgrade'|withFunc">
<label class="col-sm-2 control-label">Upgrade QRCode</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.gateway_upgrade" bs-switch
switch-change="toggleGatewayUpgrade()">
switch-change="toggleGatewayUpgrade()">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Use Alipay Online</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.gateway_alipay_online" bs-switch
switch-change="toggleGatewayAlipayOnline()">
switch-change="toggleGatewayAlipayOnline()">
</div>
</div>
<div class="form-group" ng-if="'api_surcharge'|withFunc">
<label class="col-sm-2 control-label">Customer Pay for Surcharge On Gateway</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.api_surcharge" bs-switch
switch-change="updateClientApiSurCharge()">
switch-change="updateClientApiSurCharge()">
<p class="text-info">
<i class="fa fa-info"></i> If client have already attached surcharge in their own system, ignore
this choice.<br>
@ -380,8 +387,8 @@
<label class="col-sm-2 control-label">Alipay Channel</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.alipay_payment_channels" bs-switch
data-on-text="Alipay+" data-off-text="Alipay" data-off-color="primary"
ng-change="setAlipayChannel()">
data-on-text="Alipay+" data-off-text="Alipay" data-off-color="primary"
ng-change="setAlipayChannel()">
</div>
</div>
<div class="form-group">
@ -453,29 +460,29 @@
<label class="col-sm-2 control-label">CB Bank Pay Link</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay_link" bs-switch
ng-change="toggleCBBankPayLink()">
ng-change="toggleCBBankPayLink()">
&nbsp;&nbsp;<a href={{paymentInfo.cb_bankpay_url}} target="_Blank"><span
ng-if="paymentInfo.enable_cb_bankpay_link">{{paymentInfo.cb_bankpay_url}}</span></a>
ng-if="paymentInfo.enable_cb_bankpay_link">{{paymentInfo.cb_bankpay_url}}</span></a>
<i ng-if="paymentInfo.enable_cb_bankpay_link" class="fa fa-clipboard margin-r-5"
style="cursor: pointer" ng-click="copyCBBankPayLink()"></i>
style="cursor: pointer" ng-click="copyCBBankPayLink()"></i>
<input ng-if="paymentInfo.enable_cb_bankpay_link" style="opacity: 0" id="cpcbbankpay"
value={{paymentInfo.cb_bankpay_url}} readonly>
value={{paymentInfo.cb_bankpay_url}} readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Customer Pay for Surcharge for CBBank Pay</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.cbbank_surcharge" bs-switch
ng-change="updateClientCBBankPaySurCharge()">
ng-change="updateClientCBBankPaySurCharge()">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">CB Bank Pay Channel</label>
<div class="col-sm-3">
<select class="form-control" name="industry"
ng-change="updateCBBankPayConfig('cb_channel_id',partner.cb_channel_id)"
ng-model="partner.cb_channel_id" id="cbbankpay-input" required
ng-options="channel.channel_id as channel.channel_name for channel in cb_bankpay">
ng-change="updateCBBankPayConfig('cb_channel_id',partner.cb_channel_id)"
ng-model="partner.cb_channel_id" id="cbbankpay-input" required
ng-options="channel.channel_id as channel.channel_name for channel in cb_bankpay">
<option value="">跟随系统</option>
</select>
</div>
@ -483,7 +490,7 @@
<div class="form-group" ng-if="paymentInfo.enable_cb_bankpay && paymentInfo.enable_cb_bankpay_link">
<label class="col-sm-2 control-label">CB Bank Pay QR Code</label>
<div class="col-sm-10">
<img ng-src="{{paymentInfo.cbBankPayQrcodeUrl}}" class="img-responsive" />
<img ng-src="{{paymentInfo.cbBankPayQrcodeUrl}}" class="img-responsive"/>
<div>
&nbsp;&nbsp;<span style="padding-left: 4.2%;font-size:9px;">仅支持微信客户端扫描</span>
</div>
@ -498,7 +505,7 @@
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changeCBBankPaymentPage()"
ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
ng-model="paymentInfo.cbbank_paypad_version" title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
</select>
@ -507,9 +514,9 @@
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v1'"
src="/static/images/cbbank_payment_page_v1.jpg">
src="/static/images/cbbank_payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.cbbank_paypad_version=='v2'"
src="/static/images/cbbank_payment_page_v2.jpg">
src="/static/images/cbbank_payment_page_v2.jpg">
</div>
</div>
</div>
@ -527,14 +534,36 @@
<label class="col-sm-2 control-label">Enable International Card</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_international_card" bs-switch
switch-change="switchInternationalCard()">
switch-change="switchInternationalCard()">
</div>
</div>
<div class="form-group" ng-if="'111'|withRole">
<label class="col-sm-2 control-label">Enable 3DS</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_threeds" bs-switch
switch-change="switchThreeDS()">
switch-change="switchThreeDS()">
</div>
</div>
</div>
</div>
</div>
<!--AlipayCN支付渠道切换-->
<div class="panel panel-default" ng-if="(('111'|withRole))">
<div class="panel-heading">AlipayCN Channel Configuration</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">AlipayCN channel</label>
<div class="col-xs-6">
<label class="radio-inline">
<input type="radio" value="0" ng-model="paymentInfo.alipay_cn_switch" ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)">
Alipay
</label>
<label class="radio-inline">
<input type="radio" value="1" ng-model="paymentInfo.alipay_cn_switch" ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)">
Alipay+(APS)
</label>
</div>
</div>
</div>
@ -550,14 +579,14 @@
<label class="col-sm-2 control-label">Enable Socket</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_retail" bs-switch
switch-change="toggleOffline()">
switch-change="toggleOffline()">
</div>
</div>
<div class="form-group" ng-if="'retail_surcharge'|withFunc">
<label class="col-sm-2 control-label">Customer Pay for Surcharge for Retail</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.retail_surcharge" bs-switch
switch-change="updateClientRetailPaySurCharge()">
switch-change="updateClientRetailPaySurCharge()">
</div>
</div>
</div>
@ -565,14 +594,14 @@
</div>
<div class="panel panel-default">
<div class="panel-heading">Refund </div>
<div class="panel-heading">Refund</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group" ng-if="'1000000000111'|withRole">
<label class="col-sm-2 control-label">Enable Refund</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_refund" bs-switch
switch-change="toggleRefund()">
switch-change="toggleRefund()">
</div>
</div>
@ -580,7 +609,7 @@
<label class="col-sm-2 control-label">Enable Pre-authorize Refund</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_pre_refund" bs-switch
switch-change="togglePreRefund()">
switch-change="togglePreRefund()">
</div>
</div>
@ -589,13 +618,13 @@
<label class="col-sm-2 control-label">Refund Credit Line</label>
<div class="col-sm-9">
<p ng-if="!ctrl.editRefundCreditLine" class="form-control-static">
{{paymentInfo.refund_credit_line||'Not Configure'}}
{{paymentInfo.refund_credit_line || 'Not Configure'}}
<a role="button" ng-click="ctrl.editRefundCreditLine=true" ng-if="'01'|withRole"><i
class="fa fa-edit"></i></a>
</p>
<div class="input-group" ng-if="ctrl.editRefundCreditLine">
<input type="number" maxlength="6" class="form-control"
ng-model="paymentInfo.refund_credit_line">
ng-model="paymentInfo.refund_credit_line">
<div class="input-group-btn">
<button class="btn btn-success" ng-click="setRefundCreditLine()">
<i class="fa fa-check"></i>
@ -619,7 +648,7 @@
</p>
<div class="input-group" ng-if="ctrl.editRefundPwd">
<input type="text" class="form-control" maxlength="6" minlength="1"
ng-model="paymentInfo.new_refund_password">
ng-model="paymentInfo.new_refund_password">
<div class="input-group-btn">
<button class="btn btn-success" ng-click="resetRefundPwd(paymentInfo.new_refund_password)">
<i class="fa fa-check"></i>
@ -646,14 +675,14 @@
<label class="col-sm-2 control-label">Require Customer Information</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.require_custinfo" bs-switch
switch-change="toggleRequireCustInfo()">
switch-change="toggleRequireCustInfo()">
</div>
</div>
<div class="form-group" ng-if="'1000000000111'|withRole">
<label class="col-sm-2 control-label">Require Remark</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.require_remark" bs-switch
switch-change="toggleRequireRemark()">
switch-change="toggleRequireRemark()">
</div>
</div>
</div>
@ -668,7 +697,7 @@
<div class="col-sm-10">
<div ng-if="param.type=='boolean'">
<input type="checkbox" ng-model="param.value" bs-switch
ng-change="extChangeParam(param.name,param.value)">
ng-change="extChangeParam(param.name,param.value)">
</div>
<div ng-if="param.type == 'string'">
@ -679,7 +708,7 @@
</p>
<div class="input-group" ng-if="param.flag">
<input type="text" class="form-control" ng-model="param.value"
title="Prevent not enough refund">
title="Prevent not enough refund">
<div class="input-group-btn">
<button class="btn btn-success" ng-click="extChangeParam(param.name,param.value)">
<i class="fa fa-check"></i>
@ -707,31 +736,31 @@
<label class="col-sm-4 control-label">Select Version</label>
<div class="col-sm-6">
<select class="form-control" ng-change="changePaymentPage()" ng-model="paymentInfo.paypad_version"
title="Payment Page">
title="Payment Page">
<option value="v1">v1</option>
<option value="v2">v2</option>
<option value="v3">v3</option>
<option value="v4">v4</option>
<option value="v5">v5</option>
<option value="v6">v6</option>
<!-- <option value="v2101">multiple payment methods</option>-->
<!-- <option value="v2101">multiple payment methods</option>-->
</select>
</div>
<div class="col-sm-12">
<label class="col-sm-4 control-label"></label>
<div class="col-sm-8" style="margin-top: 10px;">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v1'"
src="/static/images/payment_page_v1.jpg">
src="/static/images/payment_page_v1.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2'"
src="/static/images/payment_page_v2.jpg">
src="/static/images/payment_page_v2.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v3'"
src="/static/images/payment_page_v3.jpg">
src="/static/images/payment_page_v3.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v4'"
src="/static/images/payment_page_v4.jpg">
src="/static/images/payment_page_v4.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v5'"
src="/static/images/payment_page_v5.jpg">
src="/static/images/payment_page_v5.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v6'"
src="/static/images/payment_page_v6.jpg">
src="/static/images/payment_page_v6.jpg">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'"
src="/static/images/payment_page_v2101_step1.png">
<img style="width: 200px" ng-if="paymentInfo.paypad_version=='v2101'"

@ -14,9 +14,11 @@
</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">
<label ng-if="rate.rate_name != 'ApsInStore' && rate.rate_name != 'ApsCashier'" class="control-label col-sm-4" for="rate_value_input">
<span ng-if="rate.rate_name=='rpaypmt_card'">Domestic </span>
Rate Value</label>
<label ng-if="rate.rate_name == 'ApsCashier' || rate.rate_name == 'ApsInStore'" class="control-label col-sm-4" for="rate_value_input">
Interchange Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="rate_value" class="form-control" ng-model="rate.rate_value"
@ -36,7 +38,8 @@
</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>
<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"
@ -44,7 +47,8 @@
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 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>
@ -61,10 +65,12 @@
<!-- 新增transaction_fee字段 -->
<div class="form-group"
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>
<label ng-if="rate.rate_name != 'ApsInStore' && rate.rate_name != 'ApsCashier'" class="control-label col-sm-4" for="transaction_fee_input">Transaction Fee</label>
<label ng-if="rate.rate_name == 'ApsInStore' || rate.rate_name == 'ApsCashier'" class="control-label col-sm-4" for="transaction_fee_input">Service Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="transaction_fee" class="form-control" ng-model="rate.transaction_fee"
<input type="number" name="transaction_fee" 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>

@ -232,6 +232,85 @@
</div>
</div>
</div>
<div class="content content-mine">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="panel panel-default">
<div class="panel-heading">
<div class="flex-between">
<div class="flex-align-center">
<img src="/static/images/alipay_aps_big.svg" style="width: 20px;height: 20px;"
uib-tooltip="AlipayPlus" />
<h5 style="margin-left: 5px;">
Alipay+(Retail) : <span ng-bind="partnerInfo.client_moniker"></span>
<span ng-if="!partnerInfo.client_moniker">none</span>
</h5>
</div>
<div>
<button role="button" class="btn btn-info" title="Apply Sub Merchant Id"
ng-click="applyAlipayPlusRetailMerchantId()">
<i class="fa fa-plus"></i> Apply
</button>
<button role="button" class="btn btn-info" ng-click="queryAlipayPlusApsRetail()">
<i class="fa fa-search"></i> Result
</button>
</div>
</div>
</div>
<div class="panel-body">
<div style="display: flex;justify-content: center;">
<small style="color: rgba(0,0,0,.25);">No Data</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="content content-mine">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="panel panel-default">
<div class="panel-heading">
<div class="flex-between">
<div class="flex-align-center">
<img src="/static/images/alipay_aps_big.svg" style="width: 20px;height: 20px;"
uib-tooltip="AlipayPlus" />
<h5 style="margin-left: 5px;">
Alipay+(Online) : <span ng-bind="partnerInfo.client_moniker"></span>
<span ng-if="!partnerInfo.client_moniker">none</span>
</h5>
</div>
<div>
<button role="button" class="btn btn-info" title="Apply Sub Merchant Id"
ng-click="applyAlipayPlusOnlineMerchantId()">
<i class="fa fa-plus"></i> Apply
</button>
<button role="button" class="btn btn-info" ng-click="queryAlipayPlusApsOnline()">
<i class="fa fa-search"></i> Result
</button>
</div>
</div>
</div>
<div class="panel-body">
<div style="display: flex;justify-content: center;">
<small style="color: rgba(0,0,0,.25);">No Data</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Rpay+ -->
<div class="content content-mine">
<div class="row">

@ -154,6 +154,14 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button"
ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';loadTradeLogs(1)">Alipay+</a>
|
<a role="button"
ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';loadTradeLogs(1)">Alipay+(Online)</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
@ -536,6 +544,8 @@
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/alipay_aps.jpg" style="height: 25px" uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsInStore'||trade.channel=='ApsCashier'" />
{{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>

@ -155,12 +155,19 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button"
ng-class="{'bg-primary':params.channel=='ApsInStore'}"
ng-click="params.channel='ApsInStore';loadTradeLogs(1)">Alipay+</a>
|
<a role="button"
ng-class="{'bg-primary':params.channel=='ApsCashier'}"
ng-click="params.channel='ApsCashier';loadTradeLogs(1)">Alipay+(Online)</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</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>
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a>
</p>
</div>
</div>
@ -370,6 +377,8 @@
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/alipay_aps.jpg" style="height: 25px" uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsInStore'||trade.channel=='ApsCashier'" />
{{trade.order_id}}
</td>
<td>

@ -135,22 +135,17 @@
ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='APSINSTORE'}"
ng-click="params.channel='APSINSTORE';loadTradeLogs(1)">Alipay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='APSCASHIER'}"
ng-click="params.channel='APSCASHIER';loadTradeLogs(1)">Alipay+(Online)</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> |
<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> |
<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>
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a>
</p>
</div>
</div>
@ -347,6 +342,8 @@
<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'"/>
<img src="/static/images/alipay_aps.jpg" style="height: 25px" uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsInStore'||trade.channel=='ApsCashier'" />
{{trade.order_id}}
</td>
<td>

@ -214,8 +214,11 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYPLUS'}"
ng-click="params.channel='ALIPAYPLUS';loadTradeLogs(1)">Alipay+</a>
<a role="button" ng-class="{'bg-primary':params.channel=='APSINSTORE'}"
ng-click="params.channel='APSINSTORE';loadTradeLogs(1)">Alipay+</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='APSCASHIER'}"
ng-click="params.channel='APSCASHIER';loadTradeLogs(1)">Alipay+(Online)</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> |
@ -731,6 +734,9 @@
<img src="/static/images/lazada-logo.png" style="height: 20px"
uib-tooltip="Lazada Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='lazada_wallet_my'" />
<img src="/static/images/alipay_aps.jpg" style="height: 25px"
uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsInStore'||trade.channel=='ApsCashier'" />
{{trade.order_id}}<span
ng-if="trade.source!='system' && trade.source!=null && trade.incremental_surcharge != null"><i
class="fa fa-question-circle-o"

@ -191,29 +191,19 @@
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYPLUS'}"
ng-click="params.channel='ALIPAYPLUS';loadTradeLogs(1)">Alipay+</a>
<a role="button" ng-class="{'bg-primary':params.channel=='APSINSTORE'}"
ng-click="params.channel='APSINSTORE';loadTradeLogs(1)">Alipay+</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='APSCASHIER'}"
ng-click="params.channel='APSCASHIER';loadTradeLogs(1)">Alipay+(Online)</a>
|
<a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<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>
|
<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>
Payment</a>
</p>
</div>
</div>
@ -502,6 +492,9 @@
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/alipay_aps.jpg" style="height: 25px"
uib-tooltip="{{trade.pay_type}}(Alipay+™ Partner)"
ng-if="trade.channel=='ApsCashier'||trade.channel=='ApsInStore'" />
<img src="/static/images/alipay_sign.png" style="height: 20px"
uib-tooltip="Alipay CN"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_cn'" />

@ -164,6 +164,25 @@ define(['angular', 'uiRouter'], function () {
$scope.date = angular.copy($stateParams.date)
$scope.date = $scope.date.substr(0, 4) + '-' + $scope.date.substr(4, 2) + '-' + $scope.date.substr(6)
$scope.warningLevel = JSON.parse(sessionStorage.getItem('warningLevel'))
$scope.validItAgain = function () {
commonDialog
.confirm({
title: 'Confirm reconciliations',
contentHtml: $sce.trustAsHtml('<input type="checkbox" id="isSendMessage">Agree to send push message'),
})
.then(function () {
var isSendMessage = document.getElementById('isSendMessage').checked
$http
.get('/sys/financial/order_validations/' + $stateParams.date, {
params: {
use_cache: false,
is_send_message: isSendMessage,
},
timeout: 300000,
})
.then($scope.startValid())
})
}
// 加载渠道信息
$scope.startValid = function () {
$http

@ -10,6 +10,7 @@
<i class="fa fa-check-circle text-green fa-2x" style="margin-left: 24px;" ng-if="warningLevel === 0"></i>
<i class="fa fa-exclamation-triangle text-yellow fa-2x" style="margin-left: 24px;" ng-if="warningLevel === 1"></i>
<i class="fa fa-exclamation-triangle text-red fa-2x" style="margin-left: 24px;" ng-if="warningLevel === 2"></i>
<button type="button" style="margin-left: 24px" class="btn btn-primary ng-binding ng-scope" ng-click="validItAgain()">Verify it again</button>
</section>
<section class="content">
<div ng-repeat="(index,item) in channelList">

@ -37,6 +37,14 @@ $(document).ready(function () {
location.href = window.redirect;
return;
}
if (pay.web_url) {
location.href = pay.web_url;
return;
}
if (pay.mweb_url) {
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) {
callPayment();
} else {

@ -57,9 +57,9 @@ $(document).ready(function () {
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', function () {
callPayment(pay.trade_no);
});
callPayment(pay.trade_no);
}
},

@ -4,18 +4,21 @@
$(document).ready(function () {
'use strict';
decode();
function decode() {
var redirect = window.redirect;
while(redirect.indexOf('://')<0){
while (redirect.indexOf('://') < 0) {
redirect = decodeURIComponent(redirect);
if(redirect==window.redirect){
if (redirect == window.redirect) {
break;
}
window.redirect = redirect;
}
}
var dataCache = {paying: false};
$('#key_P').bind('touchstart', startPay);
function startPay() {
$('#wdiv').show();
if (dataCache.paying) {
@ -32,6 +35,9 @@ $(document).ready(function () {
location.href = window.redirect;
return;
}
if (window.client_moniker == 'PINE') {
alert(JSON.stringify(pay))
}
if (pay.web_from) {
$('#alipay_plus').html(pay.web_from)
startCheckOrder(window.order_id, window.redirect);
@ -94,7 +100,7 @@ $(document).ready(function () {
setTimeout(checkOrderStd, 500);
}
},
error:function (){
error: function () {
setTimeout(checkOrderStd, 500);
}
})

@ -0,0 +1,73 @@
$(document).ready(function (){
decode();
function decode() {
if (window.client_moniker == 'PINE') {
alert('debug:origin redirect:' + window.redirect);
}
let redirect = window.redirect;
if (window.redirect !=null) {
while (redirect.indexOf('://') < 0) {
redirect = decodeURIComponent(redirect);
if (redirect == window.redirect) {
break;
}
window.redirect = redirect;
}
}
}
let dataCache = {paying: false};
$('#key_P').bind('touchstart', startPay);
function startPay() {
$('#wdiv').show();
if (dataCache.paying) {
return;
}
dataCache.paying = true;
$.ajax({
url: './preorder',
method: 'GET',
dataType: 'json',
success: function (pay) {
if (pay.direct_paid) {
startCheckOrder(window.client_moniker, window.merchant_orderid);
return;
}
if (pay.mweb_url){
location.href = pay.mweb_url
}
},
error: function (jqXhr) {
alert(jqXhr.responseJSON.message);
$('#wdiv').hide();
dataCache.paying = false;
}
})
}
function startCheckOrder(clientMoniker, merchantOrderId) {
function checkOrderStd() {
$.ajax({
url: '/api/v1.0/payment/clients/' + clientMoniker + '/orders/' + merchantOrderId + '/status',
method: 'GET',
dataType: 'json',
success: function (res) {
if (res.paid) {
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=true&time=' + res.time + '&nonce_str=' + res.nonce_str + '&sign=' + res.sign;
} else {
setTimeout(checkOrderStd, 500);
}
}
})
}
checkOrderStd();
}
})

@ -0,0 +1,444 @@
/**
* Created by yixian on 2017-05-08
*/
$(function () {
'use strict';
// document.querySelector('body').addEventListener('touchmove', function (e) {
// if (!document.querySelector('.coupons').contains(e.target)) {
// e.preventDefault();
// }
// })
var dataCache = {price: '0', coupons: [], coupon_groups: {}};
var exchangeRate = parseFloat(window.exchange_rate);
if (window.AlipayJSBridge) {
AlipayJSBridge.call('hideOptionMenu');
} else {
document.addEventListener('AlipayJSBridgeReady', function () {
AlipayJSBridge.call('hideOptionMenu');
}, false);
}
dataCache.paying = false;
var ctrl = {};
$('.ff.key').bind('touchstart', function () {
if (dataCache.paying) {
return;
}
var char = $(this).attr('data-char');
appendChar(char);
});
$('.coupons .use-check').click(function () {
if ($(this).hasClass('disabled')) {
return;
}
var couponId = $(this).attr('data-coupon-id');
var couponGroup = $(this).attr('data-coupon-group');
if (couponGroup) {
var prevCouponId = dataCache.coupon_groups[couponGroup];
if (prevCouponId) {
var prevIdx = dataCache.coupons.indexOf(prevCouponId);
if (prevIdx >= 0) {
dataCache.coupons.splice(prevIdx, 1);
}
if (prevCouponId != couponId) {
$('.coupons .use-check[data-coupon-id="' + prevCouponId + '"]').removeClass('checked').addClass('unchecked');
dataCache.coupon_groups[couponGroup] = couponId;
} else {
dataCache.coupon_groups[couponGroup] = null;
}
} else {
dataCache.coupon_groups[couponGroup] = couponId;
}
}
if ($(this).is('.checked')) {
$(this).removeClass('checked').addClass('unchecked');
} else {
$(this).removeClass('unchecked').addClass('checked');
}
var checked = $(this).is('.checked');
if (checked) {
dataCache.coupons.push(couponId);
updatePrice();
} else {
var idx = dataCache.coupons.indexOf(couponId);
dataCache.coupons.splice(idx, 1);
updatePrice();
}
});
$('#key_B').bind('touchstart', function () {
backspace();
});
function updatePoundage(price) {
if (window.extensions.indexOf('customerrate') >= 0 && window.rateValue != null) {
if (window.use_customised_rate) {
var rate = new Decimal(100).plus(window.rateValue).div(100);
var poundageValue = new Decimal(dataCache.price).mul(rate).sub(dataCache.price);
} else {
var rateRemain = new Decimal(100).sub(window.rateValue).div(100);
poundageValue = new Decimal(dataCache.price).div(rateRemain).sub(dataCache.price);
}
dataCache.poundageValue = poundageValue.toFixed(2, Decimal.ROUND_HALF_UP);
return poundageValue.plus(price).toFixed(2, Decimal.ROUND_HALF_UP);
}
return price;
}
function updatePrice() {
$('#audVal').html(dataCache.price);
var realPrice = dataCache.price;
$('#audValReal').html(realPrice);
var surchargeData = calculateSurcharge(realPrice);
var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price;
dataCache.discounts = [];
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
});
dataCache.customSurcharge = new Decimal(price).sub(realPrice).toFixed(2, Decimal.ROUND_HALF_UP);
dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
var rate = 'CNY' == window.currency ? 1 : exchangeRate;
var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_HALF_UP);
$('#cnyVal').html(cnyVal);
dataCache.currencyPrice = 'CNY' == window.currency ? Decimal.div(priceBeforeDiscount, exchangeRate).toFixed(2, Decimal.ROUND_FLOOR) : priceBeforeDiscount;
}
function updatePoundageStatus() {
$(window.coupons).each(function () {
var coupon = this;
var couponId = coupon.couponId();
if (coupon.isEnable(dataCache.currencyPrice || 0)) {
$('.coupons .use-check[data-coupon-id=' + couponId + ']').removeClass('disabled');
} else {
var dom = $('.coupons .use-check[data-coupon-id=' + couponId + ']').addClass('disabled');
var couponGroup = dom.attr('data-coupon-group');
if (couponGroup) {
if (dataCache.coupon_groups[couponGroup] == couponId) {
dataCache.coupon_groups[couponGroup] = null;
}
}
var idx = dataCache.coupons.indexOf(couponId);
if (idx >= 0) {
dataCache.coupons.splice(idx, 1);
}
dom.removeClass('checked').addClass('unchecked');
}
})
}
updatePoundageStatus();
function backspace() {
dataCache.price = dataCache.price.substring(0, dataCache.price.length - 1);
if (dataCache.price.length == 0) {
dataCache.price = '0';
}
updatePrice();
updatePoundageStatus();
}
function appendChar(char) {
var pointLocation = dataCache.price.indexOf('.');
if (pointLocation >= 0 || char == '.' || dataCache.price.length < 5) {
if (pointLocation >= 0 && char == '.') {
return;
}
if (pointLocation >= 0 && pointLocation <= dataCache.price.length - 3) {
return;
}
if (dataCache.price == '0' && char != '.') {
dataCache.price = '';
}
dataCache.price += char;
updatePrice();
updatePoundageStatus();
}
}
$('#coupon-box-toggle').click(function () {
$('.coupons-container').addClass('show');
});
$('.coupons-container>.coupons-mask,.coupons-container #close-coupon-box').click(function () {
$(this).parents('.coupons-container').removeClass('show');
});
$('.remark-btn').click(function () {
var cfg = {
title: '备注 Remark',
template: '',
initialize: function (dialog) {
$('<textarea rows="2" autofocus="autofocus"></textarea>').addClass('remark-input').attr('name', 'remark').val(dataCache.remark || '').appendTo($('.weui_dialog_bd', dialog));
},
confirm: function (dialog, chosen) {
if (chosen) {
var remark = $('textarea[name="remark"]', dialog).val();
if (remark) {
$('#remark-box').text('备注:' + remark).show()
} else {
$('#remark-box').text('').hide();
}
dataCache.remark = remark;
}
}
};
showWeuiDialog(cfg);
});
$('.paydetail').click(function () {
var config = {
title: 'Payment Detail',
template: '',
initialize: function (dialog) {
var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'AUD' ? '$' : '¥';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (parseFloat(dataCache.customSurcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.customSurcharge).appendTo(bd);
$('<p></p>').addClass('warning-sm').html('温馨提示:商户将向您收取本次消费手续费' + window.rateValue + '%').appendTo(bd);
}
$(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);
});
$('<p></p>').addClass('final').html('Final 支付金额:' + currencySymbol + (dataCache.finalPrice || 0)).appendTo(bd);
}
};
showWeuiDialog(config);
});
$('#key_P').click(function () {
if (window.requireRemark) {
if (!dataCache.remark) {
var config = {
title: '请先输入备注',
template: ''
};
showWeuiDialog(config);
}
}
});
$('#key_P').bind('touchstart', function () {
if (window.requireRemark) {
if (!dataCache.remark) {
return;
}
}
$('#key_P').addClass('hidden');
$('#key_Loading').removeClass('hidden');
if (dataCache.paying) {
return;
}
dataCache.paying = true;
var data = {price: dataCache.price + '', original_number: true, currency: window.currency};
if (dataCache.remark) {
data.description = dataCache.remark;
}
if (window.extensions.indexOf('preauthorize') >= 0) {
data.preauthorize = true;
}
if (window.extensions.indexOf('qrcodemode') >= 0) {
data.qrmode = true;
}
if (window.extensions.indexOf('customerrate') >= 0) {
data.customerrate = true;
}
data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion;
$.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',
method: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json',
success: function (pay) {
if (pay.direct_paid) {
location.href = '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return;
}
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) {
callPayment();
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', callPayment, false);
}
function callPayment() {
try {
AlipayJSBridge.call('tradePay', {
tradeNO: pay.trade_no
}, function (res) {
dataCache.paying = false;
if (res.resultCode == '9000') {
AlipayJSBridge.call('startApp', {
appId: '20000056',
param: {
actionType: 'showSuccPage',
payResult: res.result
},
closeCurrentApp: false
});
startCheckOrder(pay.order_id, '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result');
} else if (res.resultCode == '6001') {
//do nothing
} else {
if (res.memo) {
weuiAlert(res.memo);
}
}
$('#key_P').removeClass('hidden');
$('#key_Loading').addClass('hidden');
})
} catch (err) {
weuiAlert(err)
}
}
},
error: function (jqXhr) {
weuiAlert(jqXhr.responseJSON.message);
$('#key_P').removeClass('hidden');
$('#key_Loading').addClass('hidden');
dataCache.paying = false;
}
})
});
function startCheckOrder(orderId, url) {
function checkOrderStd() {
$.ajax({
url: '/api/v1.0/payment/orders/' + orderId + '/status',
method: 'GET',
dataType: 'json',
success: function (res) {
if (res.paid) {
location.href = url;
} else {
setTimeout(checkOrderStd, 500);
}
}
})
}
checkOrderStd();
}
function weuiAlert(msg) {
var config = {
template: msg
};
showWeuiDialog(config);
}
function showWeuiDialog(config) {
if (config.templateUrl) {
$.ajax({
url: config.templateUrl,
dataType: 'html',
success: function (template) {
buildDialog(template);
}
});
} else {
buildDialog(config.template);
}
function buildDialog(template) {
var defaultConfig = {backdrop: true};
config = $.extend({}, defaultConfig, config);
var dialog = $("<div></div>", {class: 'weui_dialog_confirm'});
var mask = $('<div></div>', {class: 'weui_mask'}).appendTo(dialog);
if (config.backdrop) {
mask.click(function () {
dialog.remove();
if ($.isFunction(config.dismiss)) {
config.dismiss();
}
})
}
var dialogBox = $("<div></div>", {class: 'weui_dialog'}).appendTo(dialog);
if (config.title) {
$('<div></div>', {class: 'weui_dialog_hd'}).append($('<strong></strong>', {class: 'weui_dialog_title'}).html(config.title)).appendTo(dialogBox);
}
var dialogBody = $("<div></div>", {class: 'weui_dialog_bd'}).appendTo(dialogBox);
if (template) {
dialogBody.append(template);
}
if ($.isFunction(config.initialize)) {
config.initialize(dialog);
}
var ft = $('<div class="weui_dialog_ft"></div>').appendTo(dialogBox);
if(window.paypad_version !== 'v3'){
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #108ee9;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #108ee9;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
}else{
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
}
dialog.appendTo($('body'));
}
}
});

@ -0,0 +1,488 @@
/**
* Created by yixian on 2017-05-08
*/
var num = function(obj){
obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符
obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字
obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的
obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$",".");
obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数
};
$(function () {
'use strict';
// document.querySelector('body').addEventListener('touchmove', function(e) {
// if (!document.querySelector('.coupons').contains(e.target)) {
// e.preventDefault();
// }
// });
var dataCache = {price: '0', coupons: [], coupon_groups: {}};
var exchangeRate = parseFloat(window.exchange_rate);
if (window.AlipayJSBridge) {
AlipayJSBridge.call('hideOptionMenu');
} else {
document.addEventListener('AlipayJSBridgeReady', function () {
AlipayJSBridge.call('hideOptionMenu');
}, false);
}
dataCache.paying = false;
var ctrl = {};
$('.ff.key').bind('touchstart', function () {
if (dataCache.paying) {
return;
}
var char = $(this).attr('data-char');
appendChar(char);
});
$('#audVal').bind('input porpertychange', function () {
if (dataCache.paying) {
return;
}
var char = $(this).val();
if (parseFloat(char) >= 100000) {
char = char.slice(0, char.length - 1);
$(this).val(char);
return;
}
appendChar(char);
});
$('.coupons .use-check').click(function () {
if ($(this).hasClass('disabled')) {
return;
}
var couponId = $(this).attr('data-coupon-id');
var couponGroup = $(this).attr('data-coupon-group');
if (couponGroup) {
var prevCouponId = dataCache.coupon_groups[couponGroup];
if (prevCouponId) {
var prevIdx = dataCache.coupons.indexOf(prevCouponId);
if (prevIdx >= 0) {
dataCache.coupons.splice(prevIdx, 1);
}
if (prevCouponId != couponId) {
$('.coupons .use-check[data-coupon-id="' + prevCouponId + '"]').removeClass('checked').addClass('unchecked');
dataCache.coupon_groups[couponGroup] = couponId;
} else {
dataCache.coupon_groups[couponGroup] = null;
}
} else {
dataCache.coupon_groups[couponGroup] = couponId;
}
}
if ($(this).is('.checked')) {
$(this).removeClass('checked').addClass('unchecked');
} else {
$(this).removeClass('unchecked').addClass('checked');
}
var checked = $(this).is('.checked');
if (checked) {
dataCache.coupons.push(couponId);
updatePrice();
} else {
var idx = dataCache.coupons.indexOf(couponId);
dataCache.coupons.splice(idx, 1);
updatePrice();
}
});
$('.cb_bankpay').click(function () {
$.ajax({
url: '/sys/partners/' + window.client_moniker + '/jump/link',
method: 'GET',
success: function (res) {
location.href = res;
},
error: function (resp) {
var config = {
template: resp
};
showWeuiDialog(config);
}
})
});
$('#key_B').bind('touchstart', function () {
backspace();
});
function updatePoundage(price) {
if (window.extensions.indexOf('customerrate') >= 0 && window.rateValue != null) {
if (window.use_customised_rate) {
var rate = new Decimal(100).plus(window.rateValue).div(100);
var poundageValue = new Decimal(dataCache.price).mul(rate).sub(dataCache.price);
} else {
var rateRemain = new Decimal(100).sub(window.rateValue).div(100);
poundageValue = new Decimal(dataCache.price).div(rateRemain).sub(dataCache.price);
}
dataCache.poundageValue = poundageValue.toFixed(2, Decimal.ROUND_HALF_UP);
return poundageValue.plus(price).toFixed(2, Decimal.ROUND_HALF_UP);
}
return price;
}
function updatePrice() {
$('#audVal').html(dataCache.price);
var realPrice = dataCache.price;
$('#audValReal').html(realPrice);
var surchargeData = calculateSurcharge(realPrice);
var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price;
dataCache.discounts = [];
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
});
dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
var rate = 'CNY' == window.currency ? 1 : exchangeRate;
var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_FLOOR);
dataCache.currencyPrice = 'CNY' == window.currency ? Decimal.div(priceBeforeDiscount, exchangeRate).toFixed(2, Decimal.ROUND_FLOOR) : priceBeforeDiscount;
$('#cnyVal').html(cnyVal)
}
function backspace() {
dataCache.price = dataCache.price.substring(0, dataCache.price.length - 1);
if (dataCache.price.length == 0) {
dataCache.price = '0';
}
updatePrice();
updatePoundageStatus();
}
function appendChar(char) {
if (char == "") {
char = '0';
}
var check = /[^\d.]/g;
if (check.test(char)) {
return;
}
var tmpChar = (char.split('.')).length-1;
if (tmpChar > 1) {
return;
}
var pointLocation = dataCache.price.indexOf('.');
if (char == '.' || char.length > 8) {
return;
}
if (pointLocation >= 0 && pointLocation <= char.length - 4) {
return;
}
if (dataCache.price == '0' && char != '.') {
dataCache.price = '';
}
dataCache.price = char;
updatePrice();
updatePoundageStatus();
}
function updatePoundageStatus() {
$(window.coupons).each(function () {
var coupon = this;
var couponId = coupon.couponId();
if (coupon.isEnable(dataCache.currencyPrice || 0)) {
$('.coupons .use-check[data-coupon-id=' + couponId + ']').removeClass('disabled');
} else {
var dom = $('.coupons .use-check[data-coupon-id=' + couponId + ']').addClass('disabled');
var couponGroup = dom.attr('data-coupon-group');
if (couponGroup) {
if (dataCache.coupon_groups[couponGroup] == couponId) {
dataCache.coupon_groups[couponGroup] = null;
}
}
var idx = dataCache.coupons.indexOf(couponId);
if (idx >= 0) {
dataCache.coupons.splice(idx, 1);
}
dom.removeClass('checked').addClass('unchecked');
}
})
}
updatePoundageStatus();
$('#coupon-box-toggle').click(function () {
$('.coupons-container').addClass('show');
});
$('.coupons-container>.coupons-mask,.coupons-container #close-coupon-box').click(function () {
$(this).parents('.coupons-container').removeClass('show');
});
$('.remark-btn').click(function () {
var cfg = {
title: '备注 Remark',
template: '',
initialize: function (dialog) {
$('<textarea rows="2" autofocus="autofocus"></textarea>').addClass('remark-input').attr('name', 'remark').val(dataCache.remark || '').appendTo($('.weui_dialog_bd', dialog));
},
confirm: function (dialog, chosen) {
if (chosen) {
var remark = $('textarea[name="remark"]', dialog).val();
if (remark) {
$('#remark-box').text('备注:' + remark).show()
} else {
$('#remark-box').text('').hide();
}
dataCache.remark = remark;
}
}
};
showWeuiDialog(cfg);
});
$('.paydetail').click(function () {
var config = {
title: 'Payment Detail',
template: '',
initialize: function (dialog) {
var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'CNY' ? '¥' : '$';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (parseFloat(dataCache.surcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):' + currencySymbol + dataCache.tax).appendTo(bd);
}
$(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);
});
$('<p></p>').addClass('final').html('Final 支付金额:' + currencySymbol + (dataCache.finalPrice || 0)).appendTo(bd);
}
};
showWeuiDialog(config);
});
$('#key_P').click(function () {
dataCache.remark = $('.remark-textarea-new').val();
if (window.requireRemark) {
if (!dataCache.remark) {
var config = {
title: '请先输入备注',
template: ''
};
showWeuiDialog(config);
}
}
});
$('#key_P').bind('touchstart', function () {
dataCache.remark = $('.remark-textarea-new').val();
if (window.requireRemark) {
if (!dataCache.remark) {
return;
}
}
$('#key_P_div').addClass('hidden');
$('#key_Loading_div').removeClass('hidden');
if (dataCache.paying) {
return;
}
dataCache.paying = true;
var data = {price: dataCache.price + '', currency: window.currency};
if (dataCache.remark) {
data.description = dataCache.remark;
}
if (window.extensions.indexOf('preauthorize') >= 0) {
data.preauthorize = true;
}
if (window.extensions.indexOf('qrcodemode') >= 0) {
data.qrmode = true;
}
if (window.extensions.indexOf('customerrate') >= 0) {
data.customerrate = true;
}
data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion;
$.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',
method: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json',
success: function (pay) {
if (pay.direct_paid) {
location.href = '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return;
}
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) {
callPayment();
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', callPayment, false);
}
function callPayment() {
try {
AlipayJSBridge.call('tradePay', {
tradeNO: pay.trade_no
}, function (res) {
dataCache.paying = false;
if (res.resultCode == '9000') {
AlipayJSBridge.call('startApp', {
appId: '20000056',
param: {
actionType: 'showSuccPage',
payResult: res.result
},
closeCurrentApp: false
});
startCheckOrder(pay.order_id, '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result');
} else if (res.resultCode == '6001') {
//do nothing
} else {
if (res.memo) {
weuiAlert(res.memo);
}
}
$('#key_P_div').removeClass('hidden');
$('#key_Loading_div').addClass('hidden');
})
} catch (err) {
weuiAlert(err)
}
}
},
error: function (jqXhr) {
weuiAlert(jqXhr.responseJSON.message);
$('#key_P_div').removeClass('hidden');
$('#key_Loading_div').addClass('hidden');
dataCache.paying = false;
}
})
});
function startCheckOrder(orderId, url) {
function checkOrderStd() {
$.ajax({
url: '/api/v1.0/payment/orders/' + orderId + '/status',
method: 'GET',
dataType: 'json',
success: function (res) {
if (res.paid) {
location.href = url;
} else {
setTimeout(checkOrderStd, 500);
}
}
})
}
checkOrderStd();
}
function weuiAlert(msg) {
var config = {
template: msg
};
showWeuiDialog(config);
}
function showWeuiDialog(config) {
if (config.templateUrl) {
$.ajax({
url: config.templateUrl,
dataType: 'html',
success: function (template) {
buildDialog(template);
}
});
} else {
buildDialog(config.template);
}
function buildDialog(template) {
var defaultConfig = {backdrop: true};
config = $.extend({}, defaultConfig, config);
var dialog = $("<div></div>", {class: 'weui_dialog_confirm'});
var mask = $('<div></div>', {class: 'weui_mask'}).appendTo(dialog);
if (config.backdrop) {
mask.click(function () {
dialog.remove();
if ($.isFunction(config.dismiss)) {
config.dismiss();
}
})
}
var dialogBox = $("<div></div>", {class: 'weui_dialog'}).appendTo(dialog);
if (config.title) {
$('<div></div>', {class: 'weui_dialog_hd'}).append($('<strong></strong>', {class: 'weui_dialog_title'}).html(config.title)).appendTo(dialogBox);
}
var dialogBody = $("<div></div>", {class: 'weui_dialog_bd'}).appendTo(dialogBox);
if (template) {
dialogBody.append(template);
}
if ($.isFunction(config.initialize)) {
config.initialize(dialog);
}
var ft = $('<div class="weui_dialog_ft"></div>').appendTo(dialogBox);
if(window.paypad_version !== 'v3'){
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #0bb20c;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #0bb20c;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
} else {
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
}
dialog.appendTo($('body'));
}
}
});

@ -0,0 +1,452 @@
/**
* Created by yixian on 2017-05-08
*/
$(function () {
'use strict';
// document.querySelector('body').addEventListener('touchmove', function(e) {
// if (!document.querySelector('.coupons').contains(e.target)) {
// e.preventDefault();
// }
// });
var dataCache = {price: '0', coupons: [], coupon_groups: {}};
var exchangeRate = 'CNY' == window.currency ? 1 : parseFloat(window.exchange_rate);
dataCache.paying = false;
var ctrl = {};
if (window.AlipayJSBridge) {
AlipayJSBridge.call('hideOptionMenu');
} else {
document.addEventListener('AlipayJSBridgeReady', function () {
AlipayJSBridge.call('hideOptionMenu');
}, false);
}
dataCache.paying = false;
var ctrl = {};
$('.ff.key').bind('touchstart', function () {
if (dataCache.paying) {
return;
}
var char = $(this).attr('data-char');
appendChar(char);
});
$('.coupons .use-check').click(function () {
if ($(this).hasClass('disabled')) {
return;
}
var couponId = $(this).attr('data-coupon-id');
var couponGroup = $(this).attr('data-coupon-group');
if (couponGroup) {
var prevCouponId = dataCache.coupon_groups[couponGroup];
if (prevCouponId) {
var prevIdx = dataCache.coupons.indexOf(prevCouponId);
if (prevIdx >= 0) {
dataCache.coupons.splice(prevIdx, 1);
}
if (prevCouponId != couponId) {
$('.coupons .use-check[data-coupon-id="' + prevCouponId + '"]').removeClass('checked').addClass('unchecked');
dataCache.coupon_groups[couponGroup] = couponId;
} else {
dataCache.coupon_groups[couponGroup] = null;
}
} else {
dataCache.coupon_groups[couponGroup] = couponId;
}
}
if ($(this).is('.checked')) {
$(this).removeClass('checked').addClass('unchecked');
} else {
$(this).removeClass('unchecked').addClass('checked');
}
var checked = $(this).is('.checked');
if (checked) {
dataCache.coupons.push(couponId);
updatePrice();
} else {
var idx = dataCache.coupons.indexOf(couponId);
dataCache.coupons.splice(idx, 1);
updatePrice();
}
});
$('.cb_bankpay').click(function () {
$.ajax({
url: '/sys/partners/' + window.client_moniker + '/jump/link',
method: 'GET',
success: function (res) {
location.href = res;
},
error: function (resp) {
var config = {
template: resp
};
showWeuiDialog(config);
}
})
});
$('#key_B').bind('touchstart', function () {
backspace();
});
function updatePoundage(price) {
if (window.extensions.indexOf('customerrate') >= 0 && window.rateValue != null) {
if (window.use_customised_rate) {
var rate = new Decimal(100).plus(window.rateValue).div(100);
var poundageValue = new Decimal(dataCache.price).mul(rate).sub(dataCache.price);
} else {
var rateRemain = new Decimal(100).sub(window.rateValue).div(100);
poundageValue = new Decimal(dataCache.price).div(rateRemain).sub(dataCache.price);
}
dataCache.poundageValue = poundageValue.toFixed(2, Decimal.ROUND_HALF_UP);
return poundageValue.plus(price).toFixed(2, Decimal.ROUND_HALF_UP);
}
return price;
}
function updatePrice() {
$('#audVal').html(dataCache.price);
var realPrice = dataCache.price;
$('#audValReal').html(realPrice);
var surchargeData = calculateSurcharge(realPrice);
var price = surchargeData.newPrice || realPrice;
var priceBeforeDiscount = price;
dataCache.discounts = [];
dataCache.tax = surchargeData.tax;
dataCache.surcharge = surchargeData.surcharge;
$(window.coupons).each(function () {
price = this.handleDiscount(price, dataCache.price, dataCache.discounts, dataCache.coupons);
});
dataCache.finalPrice = new Decimal(price).toFixed(2, Decimal.ROUND_FLOOR);
var rate = 'CNY' == window.currency ? 1 : exchangeRate;
var cnyVal = Decimal.mul(price, rate).toFixed(2, Decimal.ROUND_FLOOR);
dataCache.currencyPrice = 'CNY' == window.currency ? Decimal.div(priceBeforeDiscount, exchangeRate).toFixed(2, Decimal.ROUND_FLOOR) : priceBeforeDiscount;
$('#cnyVal').html(cnyVal)
}
function backspace() {
dataCache.price = dataCache.price.substring(0, dataCache.price.length - 1);
if (dataCache.price.length == 0) {
dataCache.price = '0';
}
updatePrice();
updatePoundageStatus();
}
function appendChar(char) {
var pointLocation = dataCache.price.indexOf('.');
if (pointLocation >= 0 || char == '.' || dataCache.price.length < 5) {
if (pointLocation >= 0 && char == '.') {
return;
}
if (pointLocation >= 0 && pointLocation <= dataCache.price.length - 3) {
return;
}
if (dataCache.price == '0' && char != '.') {
dataCache.price = '';
}
dataCache.price += char;
updatePrice();
updatePoundageStatus();
}
}
function updatePoundageStatus() {
$(window.coupons).each(function () {
var coupon = this;
var couponId = coupon.couponId();
if (coupon.isEnable(dataCache.currencyPrice || 0)) {
$('.coupons .use-check[data-coupon-id=' + couponId + ']').removeClass('disabled');
} else {
var dom = $('.coupons .use-check[data-coupon-id=' + couponId + ']').addClass('disabled');
var couponGroup = dom.attr('data-coupon-group');
if (couponGroup) {
if (dataCache.coupon_groups[couponGroup] == couponId) {
dataCache.coupon_groups[couponGroup] = null;
}
}
var idx = dataCache.coupons.indexOf(couponId);
if (idx >= 0) {
dataCache.coupons.splice(idx, 1);
}
dom.removeClass('checked').addClass('unchecked');
}
})
}
updatePoundageStatus();
$('#coupon-box-toggle').click(function () {
$('.coupons-container').addClass('show');
});
$('.coupons-container>.coupons-mask,.coupons-container #close-coupon-box').click(function () {
$(this).parents('.coupons-container').removeClass('show');
});
$('.paydetail').click(function () {
var config = {
title: 'Payment Detail',
template: '',
initialize: function (dialog) {
var bd = $('.weui_dialog_bd', dialog);
var currencySymbol = window.currency == 'CNY' ? '¥' : '$';
$('<p></p>').html('Input Price 输入金额:' + currencySymbol + dataCache.price).appendTo(bd);
if (parseFloat(dataCache.surcharge) > 0) {
$('<p></p>').html('Surcharge 手续费(' + window.rateValue + '%):+' + currencySymbol + dataCache.surcharge).appendTo(bd);
}
if (parseFloat(dataCache.tax) > 0) {
$('<p></p>').html('GST(10%):' + currencySymbol + dataCache.tax).appendTo(bd);
}
$(dataCache.discounts).each(function () {
$('<p></p>').html(this.title + ':-' + currencySymbol + this.amount).appendTo(bd);
});
$('<p></p>').addClass('final').html('Final 支付金额:' + currencySymbol + (dataCache.finalPrice || 0)).appendTo(bd);
}
};
showWeuiDialog(config);
});
$('#key_P').click(function () {
if (window.requireRemark) {
if (!dataCache.remark) {
var config = {
title: '请先输入备注',
template: ''
};
showWeuiDialog(config);
}
}
});
function addBlurListen() {
$('.remark-input').on('blur', function (event) {
dataCache.remark = $('textarea[name="remark"]').val();
});
}
addBlurListen();
$('#audVal').bind('DOMNodeInserted', function(e) {
if(dataCache.price==0){
$('.pay_button').css({"background-color":"#eee",}).attr('disabled',true);
$('.bank_button').css({"background-color":"#eee",}).attr('disabled',true);
}else{
$('.pay_button').css({"background-color":"#108ee9",}).attr('disabled',false);
$('.bank_button').css({"background-color":"#FF6600",}).attr('disabled',false);
}
});
$('#key_P').bind('touchstart', function () {
if (window.requireRemark) {
if ($('textarea[name="remark"]').val()=="") {
return;
}
}
$('#key_P').addClass('hidden');
$('#key_Loading').removeClass('hidden');
if (dataCache.paying) {
return;
}
dataCache.paying = true;
var data = {price: dataCache.price + '', currency: window.currency};
if (dataCache.remark) {
data.description = dataCache.remark;
}
if (window.extensions.indexOf('preauthorize') >= 0) {
data.preauthorize = true;
}
if (window.extensions.indexOf('qrcodemode') >= 0) {
data.qrmode = true;
}
if (window.extensions.indexOf('customerrate') >= 0) {
data.customerrate = true;
}
data.coupons = dataCache.coupons;
data.qrcodeVersion = window.qrcodeVersion;
$.ajax({
url: '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders',
method: 'POST',
data: JSON.stringify(data),
contentType: 'application/json',
dataType: 'json',
success: function (pay) {
if (pay.direct_paid) {
location.href = '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return;
}
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) {
callPayment();
} else {
// 如果没有注入则监听注入的事件
document.addEventListener('AlipayJSBridgeReady', callPayment, false);
}
function callPayment() {
try {
AlipayJSBridge.call('tradePay', {
tradeNO: pay.trade_no
}, function (res) {
dataCache.paying = false;
if (res.resultCode == '9000') {
AlipayJSBridge.call('startApp', {
appId: '20000056',
param: {
actionType: 'showSuccPage',
payResult: res.result
},
closeCurrentApp: false
});
startCheckOrder(pay.order_id, '/api/v1.0/alipay_aps/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result');
} else if (res.resultCode == '6001') {
//do nothing
} else {
if (res.memo) {
weuiAlert(res.memo);
}
}
$('#key_P_div').removeClass('hidden');
$('#key_Loading_div').addClass('hidden');
})
} catch (err) {
weuiAlert(err)
}
}
},
error: function (jqXhr) {
weuiAlert(jqXhr.responseJSON.message);
$('#key_P_div').removeClass('hidden');
$('#key_Loading_div').addClass('hidden');
dataCache.paying = false;
}
})
});
function startCheckOrder(orderId, url) {
function checkOrderStd() {
$.ajax({
url: '/api/v1.0/payment/orders/' + orderId + '/status',
method: 'GET',
dataType: 'json',
success: function (res) {
if (res.paid) {
location.href = url;
} else {
setTimeout(checkOrderStd, 500);
}
}
})
}
checkOrderStd();
}
function weuiAlert(msg) {
var config = {
template: msg
};
showWeuiDialog(config);
}
function showWeuiDialog(config) {
if (config.templateUrl) {
$.ajax({
url: config.templateUrl,
dataType: 'html',
success: function (template) {
buildDialog(template);
}
});
} else {
buildDialog(config.template);
}
function buildDialog(template) {
var defaultConfig = {backdrop: true};
config = $.extend({}, defaultConfig, config);
var dialog = $("<div></div>", {class: 'weui_dialog_confirm'});
var mask = $('<div></div>', {class: 'weui_mask'}).appendTo(dialog);
if (config.backdrop) {
mask.click(function () {
dialog.remove();
if ($.isFunction(config.dismiss)) {
config.dismiss();
}
})
}
var dialogBox = $("<div></div>", {class: 'weui_dialog'}).appendTo(dialog);
if (config.title) {
$('<div></div>', {class: 'weui_dialog_hd'}).append($('<strong></strong>', {class: 'weui_dialog_title'}).html(config.title)).appendTo(dialogBox);
}
var dialogBody = $("<div></div>", {class: 'weui_dialog_bd'}).appendTo(dialogBox);
if (template) {
dialogBody.append(template);
}
if ($.isFunction(config.initialize)) {
config.initialize(dialog);
}
var ft = $('<div class="weui_dialog_ft"></div>').appendTo(dialogBox);
if(window.paypad_version !== 'v3'){
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #0bb20c;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #0bb20c;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
} else {
if ($.isFunction(config.confirm)) {
var yes = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
yes.click(function () {
config.confirm(dialog, true);
dialog.remove();
});
var no = $('<a></a>', {class: 'weui_btn_dialog default', text: 'Cancel'}).appendTo(ft);
no.click(function () {
config.confirm(dialog, false);
dialog.remove();
})
} else {
var ok = $('<a></a>', {
class: 'weui_btn_dialog primary',
text: 'OK',
style: 'background: #FF9705;color: #fff;'
}).appendTo(ft);
ok.click(function () {
dialog.remove();
})
}
}
dialog.appendTo($('body'));
addBlurListen();
}
}
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save