Merge branch 'develop'

# Conflicts:
#	pom.xml
master
yixian 4 years ago
commit 5433bb6b73

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

@ -32,6 +32,80 @@ orderBasic:
可以提供以下格式的精确时间yyyy-MM-dd HH:mm:ss基于GMT+10时区。 可以提供以下格式的精确时间yyyy-MM-dd HH:mm:ss基于GMT+10时区。
或以以下格式提供:数字+m/hm=分钟h=小时 或以以下格式提供:数字+m/hm=分钟h=小时
超时时间最小1m最大24h 超时时间最小1m最大24h
extra:
type: object
description: 订单扩展参数,部分渠道必填
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: 数量
orderWithChannel: orderWithChannel:
allOf: allOf:
- $ref: '#/orderBasic' - $ref: '#/orderBasic'
@ -42,6 +116,7 @@ orderWithChannel:
enum: enum:
- Alipay - Alipay
- Wechat - Wechat
- AlipayPlus
type: object type: object
required: required:
- channel - channel

@ -140,9 +140,9 @@ tags:
- name: RetailPay - name: RetailPay
description: | description: |
线下支付订单接口用于线下零售收银有B扫C和C扫B两种模式 线下支付订单接口用于线下零售收银有B扫C和C扫B两种模式
- name: AlipayOnline - name: ChannelGateway
description: | description: |
用于PC端支付宝支付创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入支付宝支付页面完成支付 用于PC端渠道网关支付创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入渠道收银台页面完成支付
该接口现仅支持支付宝。 该接口现仅支持支付宝。
<img src="img/alipayOnline_cn.png"> <img src="img/alipayOnline_cn.png">
- name: CB Bank - name: CB Bank
@ -212,7 +212,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -239,7 +239,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5
@ -833,13 +833,13 @@ paths:
description: 付款码字符串,商户可自行生成二维码 # todo description: 付款码字符串,商户可自行生成二维码 # todo
/alipay/partners/{partner_code}/orders/{partner_order_id}: /alipay/partners/{partner_code}/orders/{partner_order_id}:
put: put:
summary: 支付宝WEB订单下单 summary: 渠道网关订单下单
x-sort-order: 0 x-sort-order: 0
description: | description: |
创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入支付宝支付页面完成支付 创建订单后跳转到返回的pay_url需附加签名参数和redirect参数随后进入支付宝支付页面完成支付
该接口现仅支持支付宝。 该接口现仅支持支付宝。
tags: tags:
- AlipayOnline - ChannelGateway
parameters: parameters:
- name: partner_code - name: partner_code
in: path in: path
@ -851,7 +851,16 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'components_order.yml#/orderBasic' allOf:
- $ref: 'components_order.yml#/orderBasic'
- type: object
properties:
channel:
type: string
description: 支付渠道默认为Alipay
enum:
- Alipay
- AlipayPlus
responses: responses:
200: 200:
description: Order description: Order
@ -1016,7 +1025,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1062,7 +1071,7 @@ paths:
- MobileH5 - MobileH5
- MiniProgram - MiniProgram
- CardPayment - CardPayment
- AlipayOnline - ChannelGateway
- RetailPay - RetailPay
- CB Bank - CB Bank
- SDK Payment - SDK Payment
@ -1234,7 +1243,7 @@ paths:
- SDK Payment - SDK Payment
- CB Bank - CB Bank
- RetailPay - RetailPay
- AlipayOnline - ChannelGateway
- CardPayment - CardPayment
- MiniProgram - MiniProgram
- MobileH5 - MobileH5

@ -19,6 +19,7 @@ import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.utils.Currency;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.Order;
@ -81,12 +82,12 @@ public class OneDollarDayActivitySupportImpl implements OneDollarDayActivity, Pa
JSONObject dietOrderInfo = new JSONObject(); JSONObject dietOrderInfo = new JSONObject();
dietOrderInfo.put("order_id", orderId); dietOrderInfo.put("order_id", orderId);
dietOrderInfo.put("client_id", paymentInfo.getClientId()); dietOrderInfo.put("client_id", paymentInfo.getClientId());
String currency = paymentInfo.getCurrency(); Currency currency = paymentInfo.getCurrency();
dietOrderInfo.put("order_currency", currency); dietOrderInfo.put("order_currency", currency);
BigDecimal totalFee = paymentInfo.getTotalFee(); BigDecimal totalFee = paymentInfo.getTotalFee();
BigDecimal payAmount = totalFee.divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN); BigDecimal payAmount = totalFee.divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN);
BigDecimal payLocalCurrency = paymentInfo.getDisplayAmount().divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN); BigDecimal payLocalCurrency = paymentInfo.getDisplayAmount().divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN);
if (!"AUD".equals(currency)) { if (currency != Currency.AUD) {
BigDecimal exchange = mpPaymentApi.queryExchangeRateDecimal(clientId); BigDecimal exchange = mpPaymentApi.queryExchangeRateDecimal(clientId);
payLocalCurrency = payLocalCurrency.divide(exchange, 2, RoundingMode.DOWN); payLocalCurrency = payLocalCurrency.divide(exchange, 2, RoundingMode.DOWN);
} }
@ -95,7 +96,7 @@ public class OneDollarDayActivitySupportImpl implements OneDollarDayActivity, Pa
} }
BigDecimal discount; BigDecimal discount;
dietOrderInfo.put("order_amount", totalFee.divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN)); dietOrderInfo.put("order_amount", totalFee.divide(CommonConsts.HUNDRED, 2, RoundingMode.DOWN));
if (!"AUD".equals(currency)) { if (currency != Currency.AUD) {
BigDecimal exchange = mpPaymentApi.queryExchangeRateDecimal(clientId); BigDecimal exchange = mpPaymentApi.queryExchangeRateDecimal(clientId);
discount = DISCOUNT_AMOUNT.multiply(exchange).setScale(2, RoundingMode.DOWN); discount = DISCOUNT_AMOUNT.multiply(exchange).setScale(2, RoundingMode.DOWN);
} else { } else {

@ -79,7 +79,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Override @Override
public JSONObject getTransactionAnalysis(String clientMoniker) { public JSONObject getTransactionAnalysis(String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
Assert.notNull(client); Assert.notNull(client, "client not found");
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
return transactionAnalysisMapper.getTransactionCommonAnalysis(params); return transactionAnalysisMapper.getTransactionCommonAnalysis(params);
@ -88,7 +88,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Override @Override
public List<JSONObject> getOrderCustomerChartAnalysis(String clientMoniker) { public List<JSONObject> getOrderCustomerChartAnalysis(String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
Assert.notNull(client); Assert.notNull(client, "client not found");
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
return customerAndOrdersStatisticsMapper.getPartnerCustomerAndOrderStatistics(params); return customerAndOrdersStatisticsMapper.getPartnerCustomerAndOrderStatistics(params);
@ -97,7 +97,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Override @Override
public List<JSONObject> getTransTypesAnalysis(String clientMoniker) { public List<JSONObject> getTransTypesAnalysis(String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
Assert.notNull(client); Assert.notNull(client, "client not found");
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
return dashboardService.getTradeInTypes(params); return dashboardService.getTradeInTypes(params);
@ -106,7 +106,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Override @Override
public JSONObject getOrderAndCustomerPerDay(String clientMoniker) { public JSONObject getOrderAndCustomerPerDay(String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
Assert.notNull(client); Assert.notNull(client, "client not found");
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
return customerAndOrdersStatisticsMapper.getAvgOrderAndCustomerStatistics(params); return customerAndOrdersStatisticsMapper.getAvgOrderAndCustomerStatistics(params);
@ -115,7 +115,7 @@ public class PartnerCardDashboardServiceImp implements PartnerCardDashboardServi
@Override @Override
public List<JSONObject> getTradeAnalysisInHours(String clientMoniker) { public List<JSONObject> getTradeAnalysisInHours(String clientMoniker) {
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
Assert.notNull(client); Assert.notNull(client, "client not found");
JSONObject earlistOrder = transactionAnalysisMapper.getEarliestOrder(client.getIntValue("client_id")); JSONObject earlistOrder = transactionAnalysisMapper.getEarliestOrder(client.getIntValue("client_id"));
String timezone = client.getString("timezone"); String timezone = client.getString("timezone");
AnalysisBean analysisBean = new AnalysisBean(); AnalysisBean analysisBean = new AnalysisBean();

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.merchants.beans; package au.com.royalpay.payment.manage.merchants.beans;
import au.com.royalpay.payment.channels.wechat.runtime.beans.WechatMerchantInfo;
import au.com.royalpay.payment.tools.utils.JsonUtils;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -148,29 +150,29 @@ public class NewSubMerchantIdApply {
return params; return params;
} }
public static JSONObject resultParams(JSONObject subMerchantApplyInfo){ public static JSONObject resultParams(WechatMerchantInfo subMerchantApplyInfo){
return new JSONObject(){{ return JsonUtils.newJson(json->{
put("company_name",subMerchantApplyInfo.getString("merchant_name")); json.put("company_name",subMerchantApplyInfo.getMerchantName());
put("merchant_id",subMerchantApplyInfo.getString("merchant_id")); json.put("merchant_id",subMerchantApplyInfo.getMerchantId());
put("short_name",subMerchantApplyInfo.getString("merchant_shortname")); json.put("short_name",subMerchantApplyInfo.getMerchantShortname());
put("company_phone",subMerchantApplyInfo.getString("office_phone")); json.put("company_phone",subMerchantApplyInfo.getOfficePhone());
put("contact_person",subMerchantApplyInfo.getString("contact_name")); json.put("contact_person",subMerchantApplyInfo.getContactName());
put("contact_phone",subMerchantApplyInfo.getString("contact_phone")); json.put("contact_phone",subMerchantApplyInfo.getContactPhone());
put("contact_email",subMerchantApplyInfo.getString("contact_email")); json.put("contact_email",subMerchantApplyInfo.getContactEmail());
put("industry",subMerchantApplyInfo.getString("business_category")); json.put("industry",subMerchantApplyInfo.getBusinessCategory());
put("company_website",subMerchantApplyInfo.getString("website")); json.put("company_website",subMerchantApplyInfo.getWebsite());
put("mcc_code",subMerchantApplyInfo.getString("mcc_code")); json.put("mcc_code",subMerchantApplyInfo.getMccCode());
put("address",subMerchantApplyInfo.getString("stores_address")); json.put("address",subMerchantApplyInfo.getStoresAddress());
put("company_register_no",subMerchantApplyInfo.getString("extra_reg_cer_number")); json.put("company_register_no",subMerchantApplyInfo.getExtraRegCerNumber());
put("certificat_expire_date",subMerchantApplyInfo.getString("extra_reg_cer_exp_date")); json.put("certificat_expire_date",subMerchantApplyInfo.getExtraRegCerExpDate());
put("merchant_type",subMerchantApplyInfo.getString("extra_merchant_type")); json.put("merchant_type",subMerchantApplyInfo.getExtraMerchantType());
put("director_name",subMerchantApplyInfo.getString("director_name")); json.put("director_name",subMerchantApplyInfo.getDirectorName());
put("director_id_number",subMerchantApplyInfo.getString("director_id_number")); json.put("director_id_number",subMerchantApplyInfo.getDirectorIdNumber());
put("principal_name",subMerchantApplyInfo.getString("principal_name")); json.put("principal_name",subMerchantApplyInfo.getPrincipalName());
put("principal_id_number",subMerchantApplyInfo.getString("principal_id_number")); json.put("principal_id_number",subMerchantApplyInfo.getPrincipalIdNumber());
put("business_type",subMerchantApplyInfo.getString("business_type")); json.put("business_type",subMerchantApplyInfo.getBusinessType());
put("sub_merchant_id",subMerchantApplyInfo.getString("sub_merchant_id")); json.put("sub_merchant_id",subMerchantApplyInfo.getSubMerchantId());
}}; });
} }
public NewSubMerchantIdApply() { public NewSubMerchantIdApply() {

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.merchants.core; package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity; 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.exceptions.EmailException; 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.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean; import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
@ -426,10 +427,11 @@ public interface ClientManager {
void setWeekendDelay(JSONObject account, String clientMoniker, int clientId, boolean delay); void setWeekendDelay(JSONObject account, String clientMoniker, int clientId, boolean delay);
List<JSONObject> listSubMerchantIdApplys(JSONObject manager, String clientMoniker); List<ChannelMerchantInfo> listSubMerchantIdApplys(JSONObject manager, String clientMoniker);
List<JSONObject> listRpaySubMerchantIdApplys(JSONObject manager, String clientMoniker); List<JSONObject> listRpaySubMerchantIdApplys(JSONObject manager, String clientMoniker);
@Deprecated
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager); String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager);
String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager); String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager);
@ -456,8 +458,6 @@ public interface ClientManager {
List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager); List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager);
void clearCacheSubMerchantIdApplices(String clientMoniker);
JSONObject getCheckClientInfo(int client_id, String account_id, String channel); JSONObject getCheckClientInfo(int client_id, String account_id, String channel);
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker, JSONObject manager); List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker, JSONObject manager);

@ -0,0 +1,68 @@
package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Optional;
/**
* @Description
* @title:
* @Date 2021/1/28 11:15
* @author: zhangTao
*/
@Component
public class AlipayChannelsConfig {
@Resource
private ClientConfigMapper clientConfigMapper;
public boolean isMandatoryAlipayOnline(int clientId) {
Optional<JSONObject> optionalClientConfigInfo = getClientConfig(clientId);
if (optionalClientConfigInfo.isPresent()){
JSONObject clientConfigInfo = optionalClientConfigInfo.get();
if (clientConfigInfo.getBooleanValue("mandatory_alipay_online")){
return true;
}
}
return false;
}
public void modifyMandatoryAlipayOnline(int clientId ,boolean mandatoryAlipayOnlineStatus){
JSONObject mandatoryAlipayOnlineConfig = new JSONObject();
mandatoryAlipayOnlineConfig.put("client_id",clientId);
mandatoryAlipayOnlineConfig.put("mandatory_alipay_online",mandatoryAlipayOnlineStatus);
clientConfigMapper.update(mandatoryAlipayOnlineConfig);
}
public boolean isAlipayPlus(int clientId) {
Optional<JSONObject> optionalClientConfigInfo = getClientConfig(clientId);
if (optionalClientConfigInfo.isPresent()){
JSONObject clientConfigInfo = optionalClientConfigInfo.get();
if (clientConfigInfo.getBooleanValue("alipay_payment_channels")){
return true;
}
}
return false;
}
public void modifyAlipayPaymentChannels(int clientId ,boolean alipayPaymentChannelsStatus){
JSONObject mandatoryAlipayOnlineConfig = new JSONObject();
mandatoryAlipayOnlineConfig.put("client_id",clientId);
mandatoryAlipayOnlineConfig.put("alipay_payment_channels",alipayPaymentChannelsStatus);
clientConfigMapper.update(mandatoryAlipayOnlineConfig);
}
private Optional<JSONObject> getClientConfig(int clientId) {
Optional<JSONObject> optionalClientConfigInfo = Optional.of(clientConfigMapper.find(clientId));
return optionalClientConfigInfo;
}
}

@ -2,24 +2,33 @@ package au.com.royalpay.payment.manage.merchants.core.impls;
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig; 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.config.AlipayEnvironment;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient; import au.com.royalpay.payment.channels.alipay.runtime.AlipayOnlineApi;
import au.com.royalpay.payment.channels.rpay.runtime.RpayApi; import au.com.royalpay.payment.channels.alipay.runtime.AlipayRetailApi;
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.beans.SubRpayMerchantInfo;
import au.com.royalpay.payment.channels.rpay.runtime.impls.RPayMerchantRegister;
import au.com.royalpay.payment.channels.rpaypaymentsvc.mappers.RPayMerchantMapper; import au.com.royalpay.payment.channels.rpaypaymentsvc.mappers.RPayMerchantMapper;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.RPayPaymentCardSvcApi; import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.RPayPaymentCardSvcApi;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity; import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity;
import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig; import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment; 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.MpPaymentApi;
import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo; import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfo;
import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfoInheritance; import au.com.royalpay.payment.channels.wechat.runtime.beans.SubMerchantInfoInheritance;
import au.com.royalpay.payment.channels.wechat.runtime.beans.WechatMerchantInfo;
import au.com.royalpay.payment.channels.wechat.runtime.impls.WxPayMerchantRegister;
import au.com.royalpay.payment.channels.wechat.runtime.impls.WxPayMerchantRegisterLegacy;
import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper; import au.com.royalpay.payment.channels.wechat.runtime.mappers.PaymentChannelMccGoodMapper;
import au.com.royalpay.payment.channels.wechat.runtime.mappers.WxMerchantApplyMapper;
import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.PaymentChannelApi; import au.com.royalpay.payment.core.PaymentChannelApi;
import au.com.royalpay.payment.core.beans.ChannelMerchantInfo;
import au.com.royalpay.payment.core.beans.EmptyMerchantApplication; import au.com.royalpay.payment.core.beans.EmptyMerchantApplication;
import au.com.royalpay.payment.core.beans.MerchantApplicationResult; import au.com.royalpay.payment.core.beans.MerchantApplicationResult;
import au.com.royalpay.payment.core.exceptions.EmailException; import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.impls.MerchantChannelApplicationManager;
import au.com.royalpay.payment.core.impls.MerchantChannelPermissionManager;
import au.com.royalpay.payment.core.mappers.SysClientMapper; import au.com.royalpay.payment.core.mappers.SysClientMapper;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver; import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper; import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
@ -74,6 +83,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage; import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatException; import au.com.royalpay.payment.tools.connections.mpsupport.exceptions.WechatException;
import au.com.royalpay.payment.tools.defines.IncrementalChannel; import au.com.royalpay.payment.tools.defines.IncrementalChannel;
import au.com.royalpay.payment.tools.defines.PayChannel;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -87,6 +97,7 @@ import au.com.royalpay.payment.tools.lock.Locker;
import au.com.royalpay.payment.tools.mail.SendMail; import au.com.royalpay.payment.tools.mail.SendMail;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig; import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO; import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import au.com.royalpay.payment.tools.merchants.core.MerchantChannelPermissionResolver;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.merchants.qrboard.QRBoard; import au.com.royalpay.payment.tools.merchants.qrboard.QRBoard;
import au.com.royalpay.payment.tools.merchants.qrboard.QRBoardProvider; import au.com.royalpay.payment.tools.merchants.qrboard.QRBoardProvider;
@ -168,7 +179,7 @@ import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.chec
*/ */
@Service @Service
public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvider, ApplicationEventPublisherAware { public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvider, ApplicationEventPublisherAware {
private Logger logger = LoggerFactory.getLogger(getClass()); private final Logger logger = LoggerFactory.getLogger(getClass());
@Resource @Resource
private ClientMapper clientMapper; private ClientMapper clientMapper;
@Resource @Resource
@ -216,20 +227,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private ClientModifySupport clientModifySupport; private ClientModifySupport clientModifySupport;
@Resource @Resource
private PaymentChannelApi[] channels; private MerchantChannelApplicationManager merchantChannelApplicationManager;
@Resource @Resource
private MerchantInfoProvider merchantInfoProvider; private MerchantInfoProvider merchantInfoProvider;
@Resource @Resource
private MpPaymentApi mpPaymentApi;
@Resource
private SignInAccountService signInAccountService; private SignInAccountService signInAccountService;
@Resource
private WxPayClient wxPayClient;
@Resource
private AlipayClient alipayClient;
@Resource
private RpayApi rpayApi;
@Resource @Resource
private ManagerMapper managerMapper; private ManagerMapper managerMapper;
@ -251,7 +253,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private ClientAuditProcessMapper clientAuditProcessMapper; private ClientAuditProcessMapper clientAuditProcessMapper;
@Resource @Resource
private SysWxMerchantApplyMapper sysWxMerchantApplyMapper; private WxMerchantApplyMapper wxMerchantApplyMapper;
@Resource @Resource
private SysRpayMerchantApplyMapper sysRpayMerchantApplyMapper; private SysRpayMerchantApplyMapper sysRpayMerchantApplyMapper;
@Resource @Resource
@ -279,8 +281,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private MailGunService mailGunService; private MailGunService mailGunService;
@Resource @Resource
private MailSendMapper mailSendMapper;
@Resource
private ClearingDetailMapper clearingDetailMapper; private ClearingDetailMapper clearingDetailMapper;
@Resource @Resource
private ClearingLogMapper clearingLogMapper; private ClearingLogMapper clearingLogMapper;
@ -326,6 +326,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RPayMerchantMapper rPayMerchantMapper; private RPayMerchantMapper rPayMerchantMapper;
@Resource @Resource
private SysClientUpayProfileMapper sysClientUpayProfileMapper; private SysClientUpayProfileMapper sysClientUpayProfileMapper;
@Resource
private PaymentApi paymentApi;
@Resource
private MerchantChannelPermissionManager merchantChannelPermissionManager;
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy"); DateTimeFormatter formatter = DateTimeFormat.forPattern("dd MMM yyyy");
@ -362,6 +367,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper; private PaymentChannelMccGoodMapper paymentChannelMccGoodMapper;
@PostConstruct @PostConstruct
public void init() { public void init() {
tags.add("account"); tags.add("account");
@ -539,10 +545,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (representativeInfo != null) { if (representativeInfo != null) {
client.put("representativeInfo", representativeInfo); client.put("representativeInfo", representativeInfo);
} }
JSONObject wechatMcc= paymentChannelMccGoodMapper.findWechatPayMccByClientId(client.getIntValue("client_id")); JSONObject wechatMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(client.getIntValue("client_id"));
if (wechatMcc != null) { if (wechatMcc != null) {
client.put("mc_code", wechatMcc.getIntValue("mc_code")); client.put("mc_code", wechatMcc.getIntValue("mc_code"));
} }
client.put("enable_alipayplus", false);
MerchantChannelPermissionResolver resolver = this.paymentApi.channelApi(PayChannel.ALIPAY_PLUS.getChannelCode()).getChannelPermissionResolver();
if(!Objects.isNull(resolver)) {
if (resolver.newOrderEnabled(client)) {
client.put("enable_alipayplus", true);
}
}
return client; return client;
} }
@ -876,22 +889,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
/** /**
* mccode * mccode
*
* @param partner * @param partner
*/ */
private void saveWechatMcc(JSONObject partner){ private void saveWechatMcc(JSONObject partner) {
JSONObject wxGoodMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(partner.getIntValue("client_id")); JSONObject wxGoodMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(partner.getIntValue("client_id"));
if ((wxGoodMcc == null || wxGoodMcc.isEmpty())&& !TextUtils.isEmpty(partner.getString("mc_code"))) { if ((wxGoodMcc == null || wxGoodMcc.isEmpty()) && !TextUtils.isEmpty(partner.getString("mc_code"))) {
wxGoodMcc = new JSONObject(); wxGoodMcc = new JSONObject();
wxGoodMcc.put("client_id",partner.getIntValue("client_id")); wxGoodMcc.put("client_id", partner.getIntValue("client_id"));
wxGoodMcc.put("mc_code",partner.getString("mc_code")); wxGoodMcc.put("mc_code", partner.getString("mc_code"));
wxGoodMcc.put("channel","Wechat"); wxGoodMcc.put("channel", "Wechat");
wxGoodMcc.put("creation_date",new Date()); wxGoodMcc.put("creation_date", new Date());
wxGoodMcc.put("creation_by","System"); wxGoodMcc.put("creation_by", "System");
paymentChannelMccGoodMapper.save(wxGoodMcc); paymentChannelMccGoodMapper.save(wxGoodMcc);
return; return;
} }
if(!TextUtils.isEmpty(partner.getString("mc_code"))) { if (!TextUtils.isEmpty(partner.getString("mc_code"))) {
wxGoodMcc.put("mc_code", partner.getString("mc_code")); wxGoodMcc.put("mc_code", partner.getString("mc_code"));
paymentChannelMccGoodMapper.update(wxGoodMcc); paymentChannelMccGoodMapper.update(wxGoodMcc);
} }
@ -976,7 +990,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
clientConfigMapper.update(clientConfig); clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
client.put("mc_code",info.getMc_code()); client.put("mc_code", info.getMc_code());
saveWechatMcc(client); saveWechatMcc(client);
} }
@ -1069,7 +1083,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String originSubMerchantId = client.getString("sub_merchant_id"); String originSubMerchantId = client.getString("sub_merchant_id");
update.put("client_id", clientId); update.put("client_id", clientId);
String subMerchantId = subMerchantInfo.getString("sub_merchant_id"); String subMerchantId = subMerchantInfo.getString("sub_merchant_id");
WeChatPayConfig.Merchant availableMerchant = mpPaymentApi.determineMerchant(subMerchantId); MpPaymentApi wxApi = (MpPaymentApi) paymentApi.channelApi(PayChannel.WECHAT.getChannelCode());
WeChatPayConfig.Merchant availableMerchant = wxApi.determineMerchant(subMerchantId);
update.put("merchant_id", availableMerchant == null ? null : availableMerchant.getMerchantId()); update.put("merchant_id", availableMerchant == null ? null : availableMerchant.getMerchantId());
update.put("sub_merchant_id", subMerchantId); update.put("sub_merchant_id", subMerchantId);
try { try {
@ -1556,16 +1571,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override @Override
public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) { public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) {
for (PaymentChannelApi channelApi : channels) { for (PaymentChannelApi channelApi : paymentApi.channels()) {
if (channelApi.channel().equalsIgnoreCase(channel) || "CB_BankPay".equalsIgnoreCase(channel)) { if (channelApi.channel().equalsIgnoreCase(channel) ) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new NotFoundException("Client Not Exists"); throw new NotFoundException("Client Not Exists");
} }
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow)); merchantChannelPermissionManager.switchMerchantChannelPermission(channelApi.getMetadata().payChannel(), client.getIntValue("client_id"), allow);
try {
logger.info(manager.getString("display_name") + "(" + manager.getString("manager_id") + ") switched client " + clientMoniker + " channel " clientModifySupport.processModify(new SwitchPermissionModify(manager, clientMoniker, "enable_" + channel.toLowerCase(), allow));
+ channel + " to " + allow); } catch (Exception e) {
logger.error("Failed to change channel switch:{}" ,channel);
}
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))) { if (allow && (StringUtils.equalsAnyIgnoreCase("Wechat", channel) || StringUtils.equalsAnyIgnoreCase("Alipay", channel))) {
int clientId = client.getIntValue("client_id"); int clientId = client.getIntValue("client_id");
List<JSONObject> clientBankAccounts = clientBankAccountMapper.clientBankAccounts(clientId); List<JSONObject> clientBankAccounts = clientBankAccountMapper.clientBankAccounts(clientId);
@ -1886,7 +1904,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
int clientId = client.getIntValue("client_id"); int clientId = client.getIntValue("client_id");
JSONObject clientConfig = clientConfigService.find(clientId); JSONObject clientConfig = clientConfigService.find(clientId);
List<JSONObject> rates = new ArrayList<>(); List<JSONObject> rates = new ArrayList<>();
for (PaymentChannelApi channel : channels) { for (PaymentChannelApi channel : paymentApi.channels()) {
rates.addAll(merchantInfoProvider.listClientRates(clientId, new Date(), channel.channel(), includingInactive)); rates.addAll(merchantInfoProvider.listClientRates(clientId, new Date(), channel.channel(), includingInactive));
} }
rates.addAll(merchantInfoProvider.listClientRates(clientId, new Date(), "CB_BankPay", includingInactive)); rates.addAll(merchantInfoProvider.listClientRates(clientId, new Date(), "CB_BankPay", includingInactive));
@ -5206,15 +5224,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat"); String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat");
MpWechatApi paymentApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid); MpWechatApi wxApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid);
String templateId = paymentApi.getTemplateId("new-apply"); String templateId = wxApi.getTemplateId("new-apply");
try { try {
TemplateMessage msg = initSendToComplianceTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComplianceTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception e) { } catch (Exception e) {
try { try {
TemplateMessage msg = initSendToComplianceTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComplianceTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception ignore) { } catch (Exception ignore) {
} }
} }
@ -5241,9 +5259,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
// String loginUrl = // String loginUrl =
// PlatformEnvironment.getEnvironment().concatUrl("/global/userstatus/manager_signin_wechat"); // PlatformEnvironment.getEnvironment().concatUrl("/global/userstatus/manager_signin_wechat");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendToBDTemplate(wxopenid, paymentApi.getTemplateId("refuse-bd"), refuseRemark, client); TemplateMessage msg = initSendToBDTemplate(wxopenid, wxApi.getTemplateId("refuse-bd"), refuseRemark, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }
@ -5270,9 +5288,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (wxopenid != null) { if (wxopenid != null) {
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat"); String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendToBDAgreeFileTemplate(wxopenid, paymentApi.getTemplateId("new-apply"), remark, client); TemplateMessage msg = initSendToBDAgreeFileTemplate(wxopenid, wxApi.getTemplateId("new-apply"), remark, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception e) { } catch (Exception e) {
} }
} }
@ -5298,15 +5316,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat"); String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat");
MpWechatApi paymentApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid); MpWechatApi wxApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid);
String templateId = paymentApi.getTemplateId("new-apply"); String templateId = wxApi.getTemplateId("new-apply");
try { try {
TemplateMessage msg = initSendToComAgreeFileTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComAgreeFileTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception e) { } catch (Exception e) {
try { try {
TemplateMessage msg = initSendToComAgreeFileTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComAgreeFileTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception ignore) { } catch (Exception ignore) {
} }
} }
@ -5331,15 +5349,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat"); String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat");
MpWechatApi paymentApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid); MpWechatApi wxApi = mpWechatApiProvider.getWechatApiForTemplateMessage(wxopenid);
String templateId = paymentApi.getTemplateId("new-apply"); String templateId = wxApi.getTemplateId("new-apply");
try { try {
TemplateMessage msg = initSendToComplianceGreenChannelTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComplianceGreenChannelTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception e) { } catch (Exception e) {
try { try {
TemplateMessage msg = initSendToComplianceGreenChannelTemplate(loginUrl, wxopenid, templateId, bd_user_name, client); TemplateMessage msg = initSendToComplianceGreenChannelTemplate(loginUrl, wxopenid, templateId, bd_user_name, client);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception ignore) { } catch (Exception ignore) {
} }
} }
@ -5392,10 +5410,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (wxopenid != null) { if (wxopenid != null) {
try { try {
TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已快速开通", "绿色通道申请通过", ""); TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已快速开通", "绿色通道申请通过", "");
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,绿色通道开通完成" + e.getMessage()); logger.error("Wechat Message Error,绿色通道开通完成", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,绿色通道开通完成,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,绿色通道开通完成,openid=" + wxopenid));
} }
} }
@ -5409,12 +5427,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), "BD申请制作合同" + client_moniker, TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), "BD申请制作合同" + client_moniker,
bd_user_name, "制作合同申请", "BD申请制作" + short_name + "的合同"); bd_user_name, "制作合同申请", "BD申请制作" + short_name + "的合同");
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
} }
} }
@ -5427,12 +5445,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String wxopenid = bd.getString("wx_openid"); String wxopenid = bd.getString("wx_openid");
if (wxopenid != null) { if (wxopenid != null) {
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "合同制作完成", TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), client_moniker + "合同制作完成",
"Compliance", "合规材料", "上传完整合规材料,商户:" + short_name); "Compliance", "合规材料", "上传完整合规材料,商户:" + short_name);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=3" + e.getMessage()); logger.error("Wechat Message Error,open_status=3", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=3,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=3,openid=" + wxopenid));
} }
@ -5450,15 +5468,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "合规材料已提交", TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), client_moniker + "合规材料已提交",
bd_user_name, "审核材料", "已提交合规材料,等待审核"); bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
} catch (Exception e) { } catch (Exception e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
} }
} }
} }
@ -5471,10 +5489,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (wxopenid != null) { if (wxopenid != null) {
try { try {
TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已正式开通", "Compliance审核通过", ""); TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已正式开通", "Compliance审核通过", "");
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=5" + e.getMessage()); logger.error("Wechat Message Error,open_status=5", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=5,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=5,openid=" + wxopenid));
} }
} }
@ -5488,12 +5506,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "申请绿色通道", TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), client_moniker + "申请绿色通道",
bd_user_name, "绿色通道申请", "BD已提交绿色通道申请,商户:" + short_name); bd_user_name, "绿色通道申请", "BD已提交绿色通道申请,商户:" + short_name);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=10"); logger.error("Wechat Message Error,open_status=10", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=10,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=10,openid=" + wxopenid));
} }
} }
@ -5517,12 +5535,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), "BD申请制作信用卡支付合同" + client_moniker, TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), "BD申请制作信用卡支付合同" + client_moniker,
bd_user_name, "制作卡支付合同申请", "BD申请制作" + short_name + "的卡支付合同"); bd_user_name, "制作卡支付合同申请", "BD申请制作" + short_name + "的卡支付合同");
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
} }
} }
@ -5535,12 +5553,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
String wxopenid = bd.getString("wx_openid"); String wxopenid = bd.getString("wx_openid");
if (wxopenid != null) { if (wxopenid != null) {
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡支付合同制作完成", TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), client_moniker + "信用卡支付合同制作完成",
"Compliance", "合规材料", "上传完整合规材料,商户:" + short_name); "Compliance", "合规材料", "上传完整合规材料,商户:" + short_name);
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=3" + e.getMessage()); logger.error("Wechat Message Error,open_status=3", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=3,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=3,openid=" + wxopenid));
} }
@ -5558,15 +5576,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
for (JSONObject compliance : complianceList) { for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid"); String wxopenid = compliance.getString("wx_openid");
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡卡支付合规材料已提交", TemplateMessage msg = initSendCommissionTemplate(wxopenid, wxApi.getTemplateId("commission"), client_moniker + "信用卡卡支付合规材料已提交",
bd_user_name, "审核材料", "已提交合规材料,等待审核"); bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
} catch (Exception e) { } catch (Exception e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage()); logger.error("Wechat Message Error,open_status=1", e);
} }
} }
} }
@ -5579,10 +5597,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (wxopenid != null) { if (wxopenid != null) {
try { try {
TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已正式开通", "Card Payment Compliance审核通过", ""); TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已正式开通", "Card Payment Compliance审核通过", "");
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (WechatException e) { } catch (WechatException e) {
logger.error("Wechat Message Error,open_status=5" + e.getMessage()); logger.error("Wechat Message Error,open_status=5", e);
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=5,openid=" + wxopenid)); publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=5,openid=" + wxopenid));
} }
} }
@ -5593,37 +5611,22 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override @Override
@Cacheable(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @Cacheable(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public List<JSONObject> listSubMerchantIdApplys(JSONObject manager, String clientMoniker) { public List<ChannelMerchantInfo> listSubMerchantIdApplys(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
List<JSONObject> applices = sysWxMerchantApplyMapper.listWxMerchantApplices(client.getInteger("client_id"), List<WechatMerchantInfo> applices = wxMerchantApplyMapper.listWxMerchantApplices(client.getInteger("client_id"),
new PageBounds(Order.formString("create_time.desc"))); new PageBounds(Order.formString("create_time.desc")));
if (!applices.isEmpty()) { if (!applices.isEmpty()) {
return applices; return new ArrayList<>(applices);
} else { } else {
if (StringUtils.isNotEmpty(client.getString("sub_merchant_id")) && StringUtils.isNotEmpty(client.getString("merchant_id"))) { if (StringUtils.isNotEmpty(client.getString("sub_merchant_id")) && StringUtils.isNotEmpty(client.getString("merchant_id"))) {
Element elem = wxPayClient.querySubMerchant(client.getString("merchant_id"), client.getString("sub_merchant_id")); WxPayMerchantRegister wxRegistry = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class)).orElseThrow(() -> new ServerErrorException("No Wechat registry found"));
JSONObject object = new JSONObject(); ChannelMerchantInfo wxMerchantInfo = wxRegistry.findMerchant(client);
object.put("sub_merchant_id", elem.elementText("sub_mch_id_0")); List<ChannelMerchantInfo> applyQuery = new ArrayList<>();
object.put("client_id", client.getInteger("client_id")); applyQuery.add(wxMerchantInfo);
object.put("merchant_name", elem.elementText("merchant_name_0"));
object.put("merchant_shortname", elem.elementText("merchant_shortname_0"));
object.put("office_phone", elem.elementText("office_phone_0"));
object.put("contact_name", elem.elementText("contact_name_0"));
object.put("contact_email", elem.elementText("contact_email_0"));
object.put("contact_phone", elem.elementText("contact_phone_0"));
object.put("business_category", elem.elementText("business_category_0"));
object.put("merchant_remark", elem.elementText("merchant_remark_0"));
object.put("website", elem.elementText("website_0"));
object.put("merchant_introduction", elem.elementText("merchant_introduction_0"));
object.put("merchant_id", client.getString("merchant_id"));
object.put("create_time", new Date());
object.put("operator", manager.getString("display_name"));
List<JSONObject> applyQuery = new ArrayList<>();
applyQuery.add(object);
return applyQuery; return applyQuery;
} }
} }
@ -5647,6 +5650,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override @Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
@Deprecated
public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) { public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
@ -5655,25 +5659,21 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
JSONObject params = subMerchantApply.insertObject(); JSONObject params = subMerchantApply.insertObject();
SubMerchantInfo subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfo.class); SubMerchantInfo subMerchantInfo = JSON.toJavaObject(params, SubMerchantInfo.class);
params.put("merchant_id", subMerchantApply.getMerchant_id());
params.put("client_id", client.getString("client_id")); MerchantApplicationResult res = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegisterLegacy.class))
params.put("create_time", new Date()); .map(channel -> channel.apply(client, subMerchantInfo, manager))
params.put("operator", manager.getString("display_name")); .orElseThrow(() -> new ServerErrorException("No Wechat merchant registry found"));
Element elem = wxPayClient.subMerchantApplication(subMerchantApply.getMerchant_id(), subMerchantInfo); if (res.isSuccess()) {
String sub_merchant_id = elem.elementText("sub_mch_id"); return res.getMid();
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
sysWxMerchantApplyMapper.insertWxMerchantApply(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else { } else {
throw new BadRequestException(elem.elementText("return_msg")); throw new BadRequestException("Failed to register wechat merchant");
} }
return sub_merchant_id;
} }
/** /**
* *
*
* @param clientMoniker * @param clientMoniker
* @param subMerchantApply * @param subMerchantApply
* @param manager * @param manager
@ -5681,7 +5681,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
*/ */
@Override @Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantApply, JSONObject manager){ public String newSubMerchantApplication(String clientMoniker, NewSubMerchantIdApply subMerchantApply, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
@ -5689,48 +5689,39 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
JSONObject params = subMerchantApply.insertObject(client); JSONObject params = subMerchantApply.insertObject(client);
SubMerchantInfoInheritance subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfoInheritance.class); SubMerchantInfoInheritance subMerchantInfo = JSON.toJavaObject(params, SubMerchantInfoInheritance.class);
params.put("merchant_id", subMerchantApply.getMerchant_id()); MerchantApplicationResult res = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class))
params.put("client_id", client.getString("client_id")); .map(channel -> channel.apply(client, subMerchantInfo, manager))
params.put("create_time", new Date()); .orElseThrow(() -> new ServerErrorException("No Wechat merchant registry found"));
params.put("operator", manager.getString("display_name")); if (res.isSuccess()) {
params.put("is_valid","1"); return res.getMid();
Element elem = wxPayClient.newSubMerchantApplication(subMerchantApply.getMerchant_id(), subMerchantInfo);
String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
List<JSONObject> subMerchants= sysWxMerchantApplyMapper.findByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
if(subMerchants.size()>0){
sysWxMerchantApplyMapper.failureSubMerchantByClientIdAndSubMerchantId(client.getInteger("client_id"),sub_merchant_id);
}
sysWxMerchantApplyMapper.insertWxMerchantApply(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else { } else {
throw new BadRequestException(elem.elementText("return_msg")); throw new BadRequestException("Failed to register wechat merchant");
} }
return sub_merchant_id;
} }
/** /**
* - * -
*
* @param clientMoniker * @param clientMoniker
* @param merchantAppId * @param merchantAppId
*/ */
@Override @Override
public JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId){ public JSONObject queryApplicationSubMerchantById(String clientMoniker, String merchantAppId) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker); JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new BadRequestException("partner code is not exists!"); throw new BadRequestException("partner code is not exists!");
} }
JSONObject subMerchantApplyInfo = sysWxMerchantApplyMapper.findByClientIdAndSubMerchantAppId(client.getInteger("client_id"), merchantAppId); WechatMerchantInfo subMerchantApplyInfo = wxMerchantApplyMapper.findByClientIdAndSubMerchantAppId(client.getInteger("client_id"), merchantAppId);
JSONObject resultParams = NewSubMerchantIdApply.resultParams(subMerchantApplyInfo); JSONObject resultParams = NewSubMerchantIdApply.resultParams(subMerchantApplyInfo);
resultParams.put("merchant_app_id",subMerchantApplyInfo.getString("merchant_app_id")); resultParams.put("merchant_app_id", subMerchantApplyInfo.getMerchantAppId());
return resultParams; return resultParams;
} }
/** /**
* *
*
* @param clientMoniker * @param clientMoniker
* @param merchantAppId * @param merchantAppId
* @param subMerchantIdApply * @param subMerchantIdApply
@ -5738,7 +5729,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
*/ */
@Override @Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager){ public void changeApplicationSubMerchantById(String clientMoniker, String merchantAppId, NewSubMerchantIdApply subMerchantIdApply, JSONObject manager) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker); JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new BadRequestException("partner code is not exists!"); throw new BadRequestException("partner code is not exists!");
@ -5746,37 +5737,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
JSONObject params = subMerchantIdApply.insertObject(client); JSONObject params = subMerchantIdApply.insertObject(client);
params.put("merchant_app_id",merchantAppId); params.put("merchant_app_id", merchantAppId);
SubMerchantInfoInheritance subMerchantInfo = JSONObject.toJavaObject(params, SubMerchantInfoInheritance.class); SubMerchantInfoInheritance subMerchantInfo = JSON.toJavaObject(params, SubMerchantInfoInheritance.class);
params.put("merchant_id", subMerchantIdApply.getMerchant_id()); params.put("merchant_id", subMerchantIdApply.getMerchant_id());
params.put("client_id", client.getString("client_id")); params.put("client_id", client.getString("client_id"));
params.put("create_time", new Date()); params.put("create_time", new Date());
params.put("operator", manager.getString("display_name")); params.put("operator", manager.getString("display_name"));
WxPayMerchantRegister register = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class))
.orElseThrow(() -> new ServerErrorException("No Register found for wechat"));
Element elem = wxPayClient.modfiySubMerchant(subMerchantIdApply.getMerchant_id(), subMerchantInfo); register.modify(merchantAppId, client, subMerchantInfo, manager);
String sub_merchant_id = elem.elementText("sub_mch_id");
if (StringUtils.isNotEmpty(sub_merchant_id)) {
params.put("sub_merchant_id", sub_merchant_id);
sysWxMerchantApplyMapper.updateSubMerchantInfoByMerchantAppId(params);
clearCacheSubMerchantIdApplices(clientMoniker);
} else {
throw new BadRequestException(elem.elementText("return_msg"));
}
} }
@Override @Override
public JSONObject querySubMerchantStatus(String clientMoniker,String subMerchantId){ public JSONObject querySubMerchantStatus(String clientMoniker, String subMerchantId) {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker); JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new BadRequestException("partner code is not exists!"); throw new BadRequestException("partner code is not exists!");
} }
Element elem = wxPayClient.querySubMerchant(client.getString("merchant_id"), subMerchantId); client.put("sub_merchant_id", subMerchantId);
WechatMerchantInfo info = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class))
.map(register -> register.findMerchant(client))
.orElseThrow(() -> new ServerErrorException("No Register found for wechat"));
Element xml = info.getRawResponseXml();
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("response_str", xml);
object.put("apply_status", elem.elementText("result_code")); object.put("apply_status", info.getRawResponse());
object.put("response_str", elem.asXML());
return object; return object;
} }
@ -5798,20 +5784,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("Alipay Industry can't be null"); throw new BadRequestException("Alipay Industry can't be null");
} }
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant(); merchantChannelApplicationManager.getRegister(AlipayRetailApi.class).apply(client, new EmptyMerchantApplication(), manager);
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
throw new BadRequestException(resultElement.elementText("error"));
}
try {
Element responseElement = resultElement.element("response").element("alipay");
if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
throw new BadRequestException(responseElement.elementText("result_code") +
":" + responseElement.elementText("reject_reason"));
}
} catch (Exception e) {
throw new ServerErrorException(e);
}
} }
@Override @Override
@ -5821,8 +5794,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant(); AlipayMerchantEntity alipayMch = merchantChannelApplicationManager.getRegister(AlipayRetailApi.class).findMerchant(client);
Element resultElement = alipayClient.queryGmsPortalStatus(mch.getPid(), client); Element resultElement = alipayMch.getRawResponseXml();
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
return "查询成功:" + resultElement.elementText("error"); return "查询成功:" + resultElement.elementText("error");
} }
@ -5841,7 +5814,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
JSONObject queryGMSJson = new JSONObject(new LinkedHashMap()); JSONObject queryGMSJson = new JSONObject(new LinkedHashMap<>());
queryGMSJson.put("service", "alipay.overseas.secmerchant.offline.maintain"); queryGMSJson.put("service", "alipay.overseas.secmerchant.offline.maintain");
queryGMSJson.put("partner", mch.getPid()); queryGMSJson.put("partner", mch.getPid());
queryGMSJson.put("sign_type", "MD5"); queryGMSJson.put("sign_type", "MD5");
@ -5877,7 +5850,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
JSONObject queryGMSJson = new JSONObject(new LinkedHashMap()); JSONObject queryGMSJson = new JSONObject(new LinkedHashMap<>());
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
queryGMSJson.put("service", "alipay.overseas.secmerchant.online.maintain"); queryGMSJson.put("service", "alipay.overseas.secmerchant.online.maintain");
queryGMSJson.put("partner", mch.getPid()); queryGMSJson.put("partner", mch.getPid());
@ -5927,19 +5900,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client); merchantChannelApplicationManager.getRegister(AlipayOnlineApi.class).apply(client, new EmptyMerchantApplication(), manager);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
throw new BadRequestException(resultElement.elementText("error"));
}
try {
Element responseElement = resultElement.element("response").element("alipay");
if (!StringUtils.equalsIgnoreCase("SUCCESS", responseElement.elementText("result_code"))) {
throw new BadRequestException(responseElement.elementText("result_code") +
":" + responseElement.elementText("reject_reason"));
}
} catch (Exception e) {
throw new ServerErrorException(e);
}
} }
@Override @Override
@ -5974,7 +5935,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.queryOnlineGmsPortalStatus(mch.getPid(), client); AlipayMerchantEntity entity = merchantChannelApplicationManager.getRegister(AlipayOnlineApi.class)
.findMerchant(client);
Element resultElement = entity.getRawResponseXml();
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
return "查询成功:" + resultElement.elementText("error"); return "查询成功:" + resultElement.elementText("error");
} }
@ -6001,20 +5964,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("您已申请成功子商务号,请勿重复申请"); throw new BadRequestException("您已申请成功子商务号,请勿重复申请");
} }
SubRpayMerchantInfo subRpayMerchantInfo = JSONObject.toJavaObject(merchantInfo, SubRpayMerchantInfo.class); SubRpayMerchantInfo subRpayMerchantInfo = JSON.toJavaObject(merchantInfo, SubRpayMerchantInfo.class);
subRpayMerchantInfo.CheckEmpty(); subRpayMerchantInfo.CheckEmpty();
JSONObject rpayMerchantInfo = rpayApi.registerMerchant(client.getIntValue("client_id"), subRpayMerchantInfo); MerchantApplicationResult rpayMerchantInfo = merchantChannelApplicationManager.getRegister(RPayMerchantRegister.class)
.apply(client, subRpayMerchantInfo, manager);
if (rpayMerchantInfo != null) { if (rpayMerchantInfo != null) {
merchantInfo.put("merchant_id", rpayMerchantInfo.getString("rpay_order_id"));
merchantInfo.put("client_id", client.getString("client_id")); clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getMid());
merchantInfo.put("create_time", new Date());
merchantInfo.put("operator", manager.getString("display_name"));
merchantInfo.put("sub_merchant_id", rpayMerchantInfo.getString("merchantId"));
merchantInfo.put("business_category", client.getString("royalpayindustry"));
merchantInfo.put("merchant_shortname", merchantInfo.getString("company_shortname"));
sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantInfo);
clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId"));
} else { } else {
throw new BadRequestException("请求失败"); throw new BadRequestException("请求失败");
} }
@ -6036,11 +5993,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return list; return list;
} }
@Override
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public void clearCacheSubMerchantIdApplices(String clientMoniker) {
}
@Override @Override
public JSONObject getCheckClientInfo(int client_id, String account_id, String channel) { public JSONObject getCheckClientInfo(int client_id, String account_id, String channel) {
JSONObject result = null; JSONObject result = null;
@ -6049,67 +6001,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) { if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) {
return result; return result;
} else { } else {
if (expireInfo.getBoolean("alert")) { if (expireInfo.getBooleanValue("alert")) {
result = new JSONObject(); result = new JSONObject();
// result.put("content","Dear Valued Merchants,\n" +
// "\n" +
// "\n" +
// "\n" +
// "We would like to extend our warm gratitude to your business for your continued support of RoyalPay.
// Without our merchants we wouldn't be where we are today. \n" +
// "\n" +
// "\n" +
// "\n" +
// "RoyalPay has and always will be committed to complying with all Australian laws, rules and
// regulations. With our deep roots in China, we also work with all Chinese regulations simultaneously
// with Australia. Since our humble beginnings in 2016 we have worked with the ATO (Australian Tax
// Office) to make sure that we are in alignment with all tax requirements. \n" +
// "\n" +
// "\n" +
// "\n" +
// "\n" +
// "During FY18 we entered negotiations with the ATO to file for GST exemptions for the part of
// surcharge fees. The ATO has recently advised that we have been unsuccessful in this bid. To ensure we
// comply with the ATO, we will need to adjust our current service agreements to be exclusionary of GST.
// \n" +
// "\n" +
// "\n" +
// "\n" +
// "This will result in contractual changes to your agreement. However, your business may be eligible to
// claim this amount back depending on the tax relationship of your business. Please consult with your
// accounting team in relation to these changes. \n" +
// "\n" +
// "\n" +
// "\n" +
// "If you have any questions related to this change please direct them to our Sales Management Team or
// your relevant BD officer.\n" +
// "\n" +
// "\n" +
// "\n" +
// "(note: GST is for the surcharge fee only, not related to the price of the goods.)\n" +
// "\n" +
// "\n" +
// "\n" +
// "尊敬的商户,\n" +
// "\n" +
// "\n" +
// "\n" +
// "\n" +
// "感谢您选择RoyalPay。作为澳洲移动支付的先行者和领导者RoyalPay自2016年起就开始针对交易手续费这一澳洲目前空白的税务问题对接澳大利亚相关监管机构。作为市场上全新的支付模式这两年来我们不断地与相关机构探讨最为合适的监管法令应用同时澳洲的相应法律法规也在不断地完善来提供更全面的监管来营造更加稳定、健康、健全的金融市场。\n"
// +
// "\n" +
// "\n" +
// "\n" +
// "RoyalPay于近期正式收到澳洲监管机构的通知针对手续费Tax Free的申请和特殊税务条款考量做出了相应的回复目前澳洲市场上的移动支付扫码解决方案所产生的手续费部分的GST并不能享受Tax
// Free及部分减免的政策条款。我们已经替2018年前交易的商户补足了手续费部分的税金并应澳大利亚税务局ATO的要求进行了合同上手续费GST部分的相应调整。您也可咨询专业的会计师来申请您额外的手续费GST
// Return。感谢您的支持和理解愿我们一起共同努力塑造一个良好而有序的澳洲移动支付市场。\n" +
// "\n" +
// "\n" +
// "\n" +
// "有任何疑问,请随时联络我们的客服与公众号。\n" +
// "\n" +
// "GST只针对手续费部分与商品价格无关\n" +
// "\n");
result.put("content", result.put("content",
"<p class=\"p1\"><span style=\"font-size: 20px;\"></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">Dear Valued Merchants,</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">We would like to extend our warm gratitude to your business for your continued support of RoyalPay. Without our merchants we wouldn&#39;t be where we are today.&nbsp;</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">RoyalPay has and always will be committed to complying with all Australian laws, rules and regulations. With our deep roots in China, we also work with all Chinese regulations simultaneously with Australia. Since our humble beginnings in 2016 we have worked with the ATO (Australian Tax Office) to make sure that we are in alignment with all tax requirements.&nbsp;</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\"></span></p><p><span style=\"font-size: 20px;\">During FY18 we entered negotiations with the ATO to file for GST exemptions for the part of surcharge fees. The ATO has recently advised that we have been unsuccessful in this bid. To ensure we comply with the ATO, we will need to adjust our current service agreements to be exclusionary of GST.&nbsp;</span></p><p><br/></p><p><span style=\"font-size: 20px;\">This will result in contractual changes to your agreement. However, your business may be eligible to claim this amount back depending on the tax relationship of your business. Please consult with your accounting team in relation to these changes.&nbsp;</span></p><p><span style=\"font-size: 20px;\"><br/></span></p><p><span style=\"font-size: 20px;\">If you have any questions related to this change please direct them to our Sales Management Team or your relevant BD officer.</span><br/></p><p><br/></p><p><strong><span style=\"font-size: 20px;\">(note: GST is for the surcharge fee only, not related to the price of the goods.)</span></strong></p><p class=\"p1\"><br/></p><p class=\"p1\"><span style=\"font-size: 20px;\">尊敬的商户,<br/></span></p><p class=\"p2\"><span style=\"font-size: 20px;\"></span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">感谢您选择RoyalPay。作为澳洲移动支付的先行者和领导者RoyalPay自2016年起就开始针对交易手续费这一澳洲目前空白的税务问题对接澳大利亚相关监管机构。作为市场上全新的支付模式这两年来我们不断地与相关机构探讨最为合适的监管法令应用同时澳洲的相应法律法规也在不断地完善来提供更全面的监管来营造更加稳定、健康、健全的金融市场。</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">RoyalPay于近期正式收到澳洲监管机构的通知针对手续费Tax Free的申请和特殊税务条款考量做出了相应的回复目前澳洲市场上的移动支付扫码解决方案所产生的手续费部分的GST并不能享受Tax Free及部分减免的政策条款。我们已经替2018年前交易的商户补足了手续费部分的税金并应澳大利亚税务局ATO的要求进行了合同上手续费GST部分的相应调整。您也可咨询专业的会计师来申请您额外的手续费GST Return。感谢您的支持和理解愿我们一起共同努力塑造一个良好而有序的澳洲移动支付市场。</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">有任何疑问,请随时联络我们的客服与公众号。</span></p><p class=\"p3\"><strong><span style=\"font-size: 20px;\">GST只针对手续费部分与商品价格无关</span></strong></p><p><br/></p>"); "<p class=\"p1\"><span style=\"font-size: 20px;\"></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">Dear Valued Merchants,</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">We would like to extend our warm gratitude to your business for your continued support of RoyalPay. Without our merchants we wouldn&#39;t be where we are today.&nbsp;</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\">RoyalPay has and always will be committed to complying with all Australian laws, rules and regulations. With our deep roots in China, we also work with all Chinese regulations simultaneously with Australia. Since our humble beginnings in 2016 we have worked with the ATO (Australian Tax Office) to make sure that we are in alignment with all tax requirements.&nbsp;</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p1\"><span style=\"font-size: 20px;\"></span></p><p><span style=\"font-size: 20px;\">During FY18 we entered negotiations with the ATO to file for GST exemptions for the part of surcharge fees. The ATO has recently advised that we have been unsuccessful in this bid. To ensure we comply with the ATO, we will need to adjust our current service agreements to be exclusionary of GST.&nbsp;</span></p><p><br/></p><p><span style=\"font-size: 20px;\">This will result in contractual changes to your agreement. However, your business may be eligible to claim this amount back depending on the tax relationship of your business. Please consult with your accounting team in relation to these changes.&nbsp;</span></p><p><span style=\"font-size: 20px;\"><br/></span></p><p><span style=\"font-size: 20px;\">If you have any questions related to this change please direct them to our Sales Management Team or your relevant BD officer.</span><br/></p><p><br/></p><p><strong><span style=\"font-size: 20px;\">(note: GST is for the surcharge fee only, not related to the price of the goods.)</span></strong></p><p class=\"p1\"><br/></p><p class=\"p1\"><span style=\"font-size: 20px;\">尊敬的商户,<br/></span></p><p class=\"p2\"><span style=\"font-size: 20px;\"></span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">感谢您选择RoyalPay。作为澳洲移动支付的先行者和领导者RoyalPay自2016年起就开始针对交易手续费这一澳洲目前空白的税务问题对接澳大利亚相关监管机构。作为市场上全新的支付模式这两年来我们不断地与相关机构探讨最为合适的监管法令应用同时澳洲的相应法律法规也在不断地完善来提供更全面的监管来营造更加稳定、健康、健全的金融市场。</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">RoyalPay于近期正式收到澳洲监管机构的通知针对手续费Tax Free的申请和特殊税务条款考量做出了相应的回复目前澳洲市场上的移动支付扫码解决方案所产生的手续费部分的GST并不能享受Tax Free及部分减免的政策条款。我们已经替2018年前交易的商户补足了手续费部分的税金并应澳大利亚税务局ATO的要求进行了合同上手续费GST部分的相应调整。您也可咨询专业的会计师来申请您额外的手续费GST Return。感谢您的支持和理解愿我们一起共同努力塑造一个良好而有序的澳洲移动支付市场。</span></p><p class=\"p2\"><span style=\"font-size: 20px;\"><br/></span></p><p class=\"p3\"><span style=\"font-size: 20px;\">有任何疑问,请随时联络我们的客服与公众号。</span></p><p class=\"p3\"><strong><span style=\"font-size: 20px;\">GST只针对手续费部分与商品价格无关</span></strong></p><p><br/></p>");
result.put("title", "【Important重要】GST Modification Notice | 澳洲监管机构关于手续费GST调整问题通知\n"); result.put("title", "【Important重要】GST Modification Notice | 澳洲监管机构关于手续费GST调整问题通知\n");
@ -6686,9 +6579,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}); });
needNotifyUsers.forEach(userOpenId -> { needNotifyUsers.forEach(userOpenId -> {
try { try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi(); MpWechatApi wxApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendTestPasswordTemplate(userOpenId, paymentApi.getTemplateId("test-merchant-password")); TemplateMessage msg = initSendTestPasswordTemplate(userOpenId, wxApi.getTemplateId("test-merchant-password"));
paymentApi.sendTemplateMessage(msg); wxApi.sendTemplateMessage(msg);
} catch (Exception e) { } catch (Exception e) {
logger.error("给{}发送微信消息失败,原因:{}", userOpenId, e); logger.error("给{}发送微信消息失败,原因:{}", userOpenId, e);
} }

@ -0,0 +1,31 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.manage.merchants.core.impls.AlipayChannelsConfig;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Description
* @title:
* @Date 2021/2/1 9:42
* @author: zhangTao
*/
@RestController
@RequestMapping("/sys/partners")
public class AlipayConfigController {
@Resource
AlipayChannelsConfig alipayChannelsConfig;
@RequestMapping(method = RequestMethod.PUT,value = "/modifyAlipayPaymentChannels/{clientId}/{alipayPaymentChannelsStatus}")
public void modifyAlipayPaymentChannels(@PathVariable Integer clientId, @PathVariable Boolean alipayPaymentChannelsStatus) {
alipayChannelsConfig.modifyAlipayPaymentChannels(clientId,alipayPaymentChannelsStatus);
}
}

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.merchants.web; package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.channels.rpaypaymentsvc.runtime.request.entities.RPayMerchantEntity; 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.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.manage.dev.core.MerchantLocationService; import au.com.royalpay.payment.manage.dev.core.MerchantLocationService;
import au.com.royalpay.payment.manage.merchants.beans.*; import au.com.royalpay.payment.manage.merchants.beans.*;
@ -826,7 +827,7 @@ public class PartnerManageController {
} }
@ManagerMapping(value = "/{clientMoniker}/list_sub_applices", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/list_sub_applices", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public List<JSONObject> listSubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public List<ChannelMerchantInfo> listSubMerchantIdApplys(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listSubMerchantIdApplys(manager, clientMoniker); return clientManager.listSubMerchantIdApplys(manager, clientMoniker);
} }
@ -836,6 +837,7 @@ public class PartnerManageController {
} }
@ManagerMapping(value = "/{clientMoniker}/sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/sub_apply", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@Deprecated
public String subMerchantApplication(@PathVariable String clientMoniker, @RequestBody SubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public String subMerchantApplication(@PathVariable String clientMoniker, @RequestBody SubMerchantIdApply subMerchantIdApply, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.subMerchantApplication(clientMoniker, subMerchantIdApply, manager); return clientManager.subMerchantApplication(clientMoniker, subMerchantIdApply, manager);
} }

@ -11,6 +11,7 @@ import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.utils.Currency;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils; import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import cn.yixblog.platform.http.HttpRequestGenerator; import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult; import cn.yixblog.platform.http.HttpRequestResult;
@ -59,6 +60,7 @@ public class CtripCouponOnlyLogProcessor implements PaymentProcessor {
private CouponAccuessLogMapper payCouponAccuessLogMapper; private CouponAccuessLogMapper payCouponAccuessLogMapper;
@Resource @Resource
private PaymentApi paymentApi; private PaymentApi paymentApi;
@Override @Override
public String processorId() { public String processorId() {
return COUPON_ID + "_USE"; return COUPON_ID + "_USE";
@ -82,7 +84,7 @@ public class CtripCouponOnlyLogProcessor implements PaymentProcessor {
} }
BigDecimal payFee = paymentInfo.getTotalFee(); BigDecimal payFee = paymentInfo.getTotalFee();
BigDecimal exchange = paymentApi.channelApi(paymentInfo.getChannel()).queryExchangeRateDecimal(paymentInfo.getClientId()); BigDecimal exchange = paymentApi.channelApi(paymentInfo.getChannel()).queryExchangeRateDecimal(paymentInfo.getClientId());
if (StringUtils.equals(paymentInfo.getCurrency(), "CNY")) { if (paymentInfo.getCurrency() == Currency.CNY) {
payFee = CurrencyAmountUtils.scale(payFee.divide(exchange, 2, RoundingMode.HALF_UP), PlatformEnvironment.getEnv().getForeignCurrency()); payFee = CurrencyAmountUtils.scale(payFee.divide(exchange, 2, RoundingMode.HALF_UP), PlatformEnvironment.getEnv().getForeignCurrency());
} }
BigDecimal couponCondition = couponInfo.getBigDecimal("condition") == null ? BigDecimal.ZERO BigDecimal couponCondition = couponInfo.getBigDecimal("condition") == null ? BigDecimal.ZERO
@ -91,15 +93,15 @@ public class CtripCouponOnlyLogProcessor implements PaymentProcessor {
return; return;
} }
JSONObject couponAccuessLog = new JSONObject(); JSONObject couponAccuessLog = new JSONObject();
couponAccuessLog.put("client_id",order.getIntValue("client_id")); couponAccuessLog.put("client_id", order.getIntValue("client_id"));
couponAccuessLog.put("customer_openid","创建订单时无"); couponAccuessLog.put("customer_openid", "创建订单时无");
couponAccuessLog.put("creation_date",new Date()); couponAccuessLog.put("creation_date", new Date());
couponAccuessLog.put("order_id",order.getString("order_id")); couponAccuessLog.put("order_id", order.getString("order_id"));
couponAccuessLog.put("coupon_id","CTRIP_"+tmpEle.getString("ctrip_coupon_id")); couponAccuessLog.put("coupon_id", "CTRIP_" + tmpEle.getString("ctrip_coupon_id"));
//携程满减 //携程满减
if (StringUtils.equals(couponInfo.getString("type"), "31")) { if (StringUtils.equals(couponInfo.getString("type"), "31")) {
BigDecimal actureAmount = couponInfo.getBigDecimal("acture_amount"); BigDecimal actureAmount = couponInfo.getBigDecimal("acture_amount");
if (StringUtils.equals(paymentInfo.getCurrency(), "CNY")) { if (paymentInfo.getCurrency() == Currency.CNY) {
actureAmount = CurrencyAmountUtils.scale(couponInfo.getBigDecimal("acture_amount").multiply(exchange), PlatformEnvironment.getEnv().getForeignCurrency()); actureAmount = CurrencyAmountUtils.scale(couponInfo.getBigDecimal("acture_amount").multiply(exchange), PlatformEnvironment.getEnv().getForeignCurrency());
} }
couponAccuessLog.put("coupon_deal_amount", actureAmount); couponAccuessLog.put("coupon_deal_amount", actureAmount);
@ -164,7 +166,7 @@ public class CtripCouponOnlyLogProcessor implements PaymentProcessor {
} }
// 使用券的信息 // 使用券的信息
private JSONObject getPreOrderCoupon(String couponLogId,int clientId) { private JSONObject getPreOrderCoupon(String couponLogId, int clientId) {
JSONObject client = merchantInfoProvider.getClientInfo(clientId); JSONObject client = merchantInfoProvider.getClientInfo(clientId);
String timestamp = System.currentTimeMillis() + ""; String timestamp = System.currentTimeMillis() + "";
String base = CUSTOMER_APP_ID + timestamp + CUSTOMER_AUTH_CODE; String base = CUSTOMER_APP_ID + timestamp + CUSTOMER_AUTH_CODE;

@ -11,9 +11,11 @@ import au.com.royalpay.payment.core.mappers.PmtOrderMapper;
import au.com.royalpay.payment.core.processors.PaymentProcessor; import au.com.royalpay.payment.core.processors.PaymentProcessor;
import au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper; import au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.defines.Money;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider; import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import au.com.royalpay.payment.tools.utils.Currency;
import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils; import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils;
import cn.yixblog.platform.http.HttpRequestGenerator; import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult; import cn.yixblog.platform.http.HttpRequestResult;
@ -91,7 +93,7 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
} }
BigDecimal payFee = paymentInfo.getTotalFee(); BigDecimal payFee = paymentInfo.getTotalFee();
BigDecimal exchange = paymentApi.channelApi(paymentInfo.getChannel()).queryExchangeRateDecimal(paymentInfo.getClientId()); BigDecimal exchange = paymentApi.channelApi(paymentInfo.getChannel()).queryExchangeRateDecimal(paymentInfo.getClientId());
if (StringUtils.equals(paymentInfo.getCurrency(), "CNY")) { if (paymentInfo.getCurrency() == Currency.CNY) {
payFee = CurrencyAmountUtils.scale(payFee.divide(exchange, 2, RoundingMode.HALF_UP), PlatformEnvironment.getEnv().getForeignCurrency()); payFee = CurrencyAmountUtils.scale(payFee.divide(exchange, 2, RoundingMode.HALF_UP), PlatformEnvironment.getEnv().getForeignCurrency());
} }
BigDecimal couponCondition = couponInfo.getBigDecimal("condition") == null ? BigDecimal.ZERO BigDecimal couponCondition = couponInfo.getBigDecimal("condition") == null ? BigDecimal.ZERO
@ -109,7 +111,7 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
//携程满减 //携程满减
if (StringUtils.equals(couponInfo.getString("type"), "31")) { if (StringUtils.equals(couponInfo.getString("type"), "31")) {
BigDecimal actureAmount = couponInfo.getBigDecimal("acture_amount"); BigDecimal actureAmount = couponInfo.getBigDecimal("acture_amount");
if (StringUtils.equals(paymentInfo.getCurrency(), "CNY")) { if (paymentInfo.getCurrency() == Currency.CNY) {
actureAmount = CurrencyAmountUtils.scale(couponInfo.getBigDecimal("acture_amount").multiply(exchange), PlatformEnvironment.getEnv().getForeignCurrency()); actureAmount = CurrencyAmountUtils.scale(couponInfo.getBigDecimal("acture_amount").multiply(exchange), PlatformEnvironment.getEnv().getForeignCurrency());
} }
paymentInfo.setDiscount(currentDiscount.add(actureAmount)); paymentInfo.setDiscount(currentDiscount.add(actureAmount));
@ -127,15 +129,15 @@ public class CtripCouponProvideProcessor implements PaymentProcessor {
payCouponAccuessLogMapper.save(couponAccuessLog); payCouponAccuessLogMapper.save(couponAccuessLog);
JSONObject updateOrder = new JSONObject(); JSONObject updateOrder = new JSONObject();
BigDecimal customerPay = paymentInfo.getUserPayAmount(); Money customerPay = paymentInfo.getUserPayAmount();
updateOrder.put("customer_payment_amount", customerPay); updateOrder.put("customer_payment_amount", customerPay.getAmount());
BigDecimal couponDiscount = paymentInfo.getDiscount(); BigDecimal couponDiscount = paymentInfo.getDiscount();
updateOrder.put("coupon_payment_amount", couponDiscount); updateOrder.put("coupon_payment_amount", couponDiscount);
updateOrder.put("order_id", paymentInfo.getOrderId()); updateOrder.put("order_id", paymentInfo.getOrderId());
pmtOrderMapper.update(updateOrder); pmtOrderMapper.update(updateOrder);
order.put("customer_payment_amount", customerPay); order.put("customer_payment_amount", customerPay.getAmount());
order.put("coupon_payment_amount", couponDiscount); order.put("coupon_payment_amount", couponDiscount);
} }

@ -1,7 +1,6 @@
package au.com.royalpay.payment.manage.tradelog.refund.impls; package au.com.royalpay.payment.manage.tradelog.refund.impls;
import au.com.royalpay.payment.core.PaymentApi; import au.com.royalpay.payment.core.PaymentApi;
import au.com.royalpay.payment.core.beans.OperatorType;
import au.com.royalpay.payment.core.exceptions.RefundExistException; import au.com.royalpay.payment.core.exceptions.RefundExistException;
import au.com.royalpay.payment.manage.analysis.beans.RefundReviewBean; import au.com.royalpay.payment.manage.analysis.beans.RefundReviewBean;
import au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper; import au.com.royalpay.payment.manage.mappers.log.CouponAccuessLogMapper;
@ -16,6 +15,7 @@ import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.tradelog.refund.RefundService; import au.com.royalpay.payment.manage.tradelog.refund.RefundService;
import au.com.royalpay.payment.manage.tradelog.refund.events.NewRefundReviewEvent; import au.com.royalpay.payment.manage.tradelog.refund.events.NewRefundReviewEvent;
import au.com.royalpay.payment.manage.tradelog.refund.events.RefundRefunseEvent; import au.com.royalpay.payment.manage.tradelog.refund.events.RefundRefunseEvent;
import au.com.royalpay.payment.tools.defines.OperatorType;
import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.env.mappers.SysConfigMapper; import au.com.royalpay.payment.tools.env.mappers.SysConfigMapper;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because it is too large Load Diff

@ -7,36 +7,37 @@
padding: 20px; padding: 20px;
border: 1px solid orange; border: 1px solid orange;
background-color: white; background-color: white;
z-index:1002; z-index: 1002;
overflow: auto; overflow: auto;
} }
.white_content::-webkit-scrollbar:vertical { .white_content::-webkit-scrollbar:vertical {
width: 11px; width: 11px;
} }
/*定义滚动条高宽及背景 /*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/ 高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar .white_content::-webkit-scrollbar {
{
-webkit-appearance: none; -webkit-appearance: none;
width:16px; width: 16px;
height:16px; height: 16px;
background-color:#F5F5F5; background-color: #F5F5F5;
} }
/*定义滚动条轨道 /*定义滚动条轨道
内阴影+圆角*/ 内阴影+圆角*/
.white_content::-webkit-scrollbar-track .white_content::-webkit-scrollbar-track {
{ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3); border-radius: 10px;
border-radius:10px; background-color: #F5F5F5;
background-color:#F5F5F5;
} }
/*定义滑块 /*定义滑块
内阴影+圆角*/ 内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb .white_content::-webkit-scrollbar-thumb {
{ border-radius: 10px;
border-radius:10px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3); background-color: #555;
background-color:#555;
} }
</style> </style>
<div class="row margin-bottom" ng-click="clickDisplayChoseDiv($event)"> <div class="row margin-bottom" ng-click="clickDisplayChoseDiv($event)">
@ -56,7 +57,7 @@
</label> </label>
<div class="col-sm-4 col-xs-8"> <div class="col-sm-4 col-xs-8">
<input class="form-control" placeholder="Keyword" ng-enter="loadTradeLogs(1)" <input class="form-control" placeholder="Keyword" ng-enter="loadTradeLogs(1)"
ng-model="params.searchText"> ng-model="params.searchText">
</div> </div>
</div> </div>
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
@ -64,15 +65,15 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status=='ALL'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL'}"
ng-click="params.status='ALL';loadTradeLogs(1)">All</a> | ng-click="params.status='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PAID'}" <a role="button" ng-class="{'bg-primary':params.status=='PAID'}"
ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a> | ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a> |
<a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}"
ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All Refund</a> | ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All Refund</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}"
ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial Refund</a> | ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial Refund</a> |
<a role="button" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}"
ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full Refund</a> | ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full Refund</a> |
</p> </p>
</div> </div>
</div> </div>
@ -81,53 +82,53 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gateway==null}" <a role="button" ng-class="{'bg-primary':params.gateway==null}"
ng-click="params.gateway=null;loadTradeLogs(1)">All</a> | ng-click="params.gateway=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}"
ng-click="params.gateway=[0,1];initGatewayChild()">Retail In-Store</a> | ng-click="params.gateway=[0,1];initGatewayChild()">Retail In-Store</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}"
ng-click="params.gateway=[5,6];initGatewayChild()">Retail API</a> | ng-click="params.gateway=[5,6];initGatewayChild()">Retail API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}"
ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> | ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([3])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([3])}"
ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> | ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([4])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([4])}"
ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> | ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([8])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([8])}"
ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> | ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([9])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([9])}"
ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party Gateway</a> | ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party Gateway</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([10])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([10])}"
ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> | ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([11])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([11])}"
ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> | ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([12])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([12])}"
ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> | ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([13])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([13])}"
ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> | ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([14])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([14])}"
ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a> ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a>
</p> </p>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]"> ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]">
<label class="control-label col-xs-4 col-sm-2">Type of payment</label> <label class="control-label col-xs-4 col-sm-2">Type of payment</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gatewayChild==null}" <a role="button" ng-class="{'bg-primary':params.gatewayChild==null}"
ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> | ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==1}" ng-class="{'bg-primary':params.gatewayChild==1}"
ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a> ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==0}" ng-class="{'bg-primary':params.gatewayChild==0}"
ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a> ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==6}" ng-class="{'bg-primary':params.gatewayChild==6}"
ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a> ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==5}" ng-class="{'bg-primary':params.gatewayChild==5}"
ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a> ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a>
</p> </p>
</div> </div>
</div> </div>
@ -136,29 +137,31 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.channel=='ALL'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALL'}"
ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> | ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}" <a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}"
ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> | ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}"
ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> | ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a> | 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'}" <a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> | ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}" <a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JDpay</a> | ng-click="params.channel='JD';loadTradeLogs(1)">JDpay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HFpay</a> | ng-click="params.channel='HF';loadTradeLogs(1)">HFpay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> | ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> | ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> | ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> | ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}" <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_DD';loadTradeLogs(1)">Direct Debit</a>
</p> </p>
</div> </div>
</div> </div>
@ -168,29 +171,24 @@
<div class="form-control-static form-inline"> <div class="form-control-static form-inline">
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-from-input" ng-model="params.datefrom" <input class="form-control" id="date-from-input" ng-model="params.datefrom"
uib-datepicker-popup size="10" placeholder="From" uib-datepicker-popup size="10" placeholder="From" is-open="dateBegin.open"
is-open="dateBegin.open" ng-click="dateBegin.open=true" ng-click="dateBegin.open=true" datepicker-options="{maxDate:params.dateto||today}">
datepicker-options="{maxDate:params.dateto||today}">
</div> </div>
~ ~
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.dateto" <input class="form-control" id="date-to-input" ng-model="params.dateto" uib-datepicker-popup
uib-datepicker-popup size="10" placeholder="To" size="10" placeholder="To" is-open="dateTo.open" ng-click="dateTo.open=true"
is-open="dateTo.open" ng-click="dateTo.open=true" datepicker-options="{minDate:params.datefrom,maxDate:today}">
datepicker-options="{minDate:params.datefrom,maxDate:today}">
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm" ng-click="chooseToday()">Today</a>
ng-click="chooseToday()">Today</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm" ng-click="chooseYesterday()">Yesterday</a>
ng-click="chooseYesterday()">Yesterday</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm" ng-click="chooseLast7Days()">Last 7
ng-click="chooseLast7Days()">Last 7
Days</a> Days</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
@ -213,25 +211,26 @@
<a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseClient('all')">All</a> <a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
|&nbsp;<a role="button" ng-class="{'bg-primary':sub.client_id==chooseClientId}" |&nbsp;<a role="button" ng-class="{'bg-primary':sub.client_id==chooseClientId}"
ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp; ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20"> <p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseClient('all')">All</a>
ng-click="chooseClient('all')">All</a> <label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)"
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;"> style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly> <input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label> </label>
</p> </p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)"> <div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;"
ng-click="choseDivStopPropagation($event)">
<div class="row"> <div class="row">
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8"> <div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword" <input class="form-control" placeholder="Keyword" ng-model="subSearchText">
ng-model="subSearchText">
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)"> <button class="btn btn-success" type="button"
ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search <i class="fa fa-search"></i> Search
</button> </button>
</div> </div>
@ -240,77 +239,75 @@
<div class="col-sm-6" style="padding: 0 2px"> <div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px"> <table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead> <thead>
<tr> <tr>
<th>Partner Code</th> <th>Partner Code</th>
<th>Partner Name</th> <th>Partner Name</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="subPartner in subClientTable1"> <tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer"> <td ng-click="showClient(subPartner); toShow = !toShow"
{{subPartner.client_moniker}} style="cursor:pointer">
</td> {{subPartner.client_moniker}}
<td ng-bind="subPartner.short_name"></td> </td>
<td> <td ng-bind="subPartner.short_name"></td>
<button role="button" class="btn btn-info" title="Add Search" <td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;" style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)"> ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</button> </button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="col-sm-6" style="padding: 0 2px"> <div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px"> <table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead> <thead>
<tr> <tr>
<th>Partner Code</th> <th>Partner Code</th>
<th>Partner Name</th> <th>Partner Name</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="subPartner in subClientTable2"> <tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer"> <td ng-click="showClient(subPartner); toShow = !toShow"
{{subPartner.client_moniker}} style="cursor:pointer">
</td> {{subPartner.client_moniker}}
<td ng-bind="subPartner.short_name"></td> </td>
<td> <td ng-bind="subPartner.short_name"></td>
<button role="button" class="btn btn-info" title="Add Search" <td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;" style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)"> ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</button> </button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="box-footer" ng-if="clients.length" style="float: right;"> <div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination" <uib-pagination class="pagination" total-items="subClientPagination.totalCount"
total-items="subClientPagination.totalCount" boundary-links="true" ng-model="subClientPagination.page"
boundary-links="true" items-per-page="subClientPagination.limit" max-size="10"
ng-model="subClientPagination.page" ng-change="searchSubClients('',subClientPagination.page)" previous-text="&lsaquo;"
items-per-page="subClientPagination.limit" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}} Total Records:{{subClientPagination.totalCount}};Total
Pages:{{subClientPagination.totalPages}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button> <button type="button" class="btn btn-danger"
ng-click="checkSubClientChoseShow('')">Cancel</button>
</div> </div>
</div> </div>
</div> </div>
@ -319,10 +316,12 @@
<label class="control-label col-xs-4 col-sm-2">Sub-Partner of sub-partners</label> <label class="control-label col-xs-4 col-sm-2">Sub-Partner of sub-partners</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':isLevel3All}" ng-click="chooseLevel3Client('all')">All</a> <a role="button" ng-class="{'bg-primary':isLevel3All}"
ng-click="chooseLevel3Client('all')">All</a>
<label ng-repeat="sub in level3Clients"> <label ng-repeat="sub in level3Clients">
|&nbsp; |&nbsp;
<a role="button" ng-class="{'bg-primary':sub.client_id==chooseLevel3ClientId}" ng-click="chooseLevel3Client(sub)">{{sub.short_name}}</a> <a role="button" ng-class="{'bg-primary':sub.client_id==chooseLevel3ClientId}"
ng-click="chooseLevel3Client(sub)">{{sub.short_name}}</a>
&nbsp; &nbsp;
</label> </label>
</p> </p>
@ -337,84 +336,140 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<h3 class="box-title" style="display: inherit">Orders <h3 class="box-title" style="display: inherit">Orders
<span class="small" ng-if="tradeLogs.length">(Found {{pagination.totalCount}} orders and {{analysis.order_count}} transactions worth of {{analysis.paid_fee|currency:'AUD'}})</span> <span class="small" ng-if="tradeLogs.length">(Found {{pagination.totalCount}} orders and
<span style="float: right;font-size: 14px;">Pre Authorization:<i class="fa fa-stop" aria-hidden="true" style="color: #fff2a5"></i></span> {{analysis.order_count}} transactions worth of {{analysis.paid_fee|currency:'AUD'}})</span>
<span style="float: right;font-size: 14px;">Pre Authorization:<i class="fa fa-stop" aria-hidden="true"
style="color: #fff2a5"></i></span>
</h3> </h3>
<div class="table-responsive col-sm-12"> <div class="table-responsive col-sm-12">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>Client Order ID</th> <th>Client Order ID</th>
<th>Order ID</th> <th>Order ID</th>
<th>Amount</th> <th>Amount</th>
<th>Input Amount</th> <th>Input Amount</th>
<th>AUD Amount</th> <th>AUD Amount</th>
<th>Exchange Rate</th> <th>Exchange Rate</th>
<th>Status</th> <th>Status</th>
<th>Create Time</th> <th>Create Time</th>
<th>Gateway</th> <th>Gateway</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}"> <tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}">
<td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td> <td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td>
<td> <td>
<img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/> <img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment"
<img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/> ng-if="trade.channel=='rpaypmt_card'" />
<img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo" ng-if="trade.channel=='Znyoo'"/> <img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit"
<img src="/static/images/wechatpay_sign.png" uib-tooltip="WechatPay" ng-if="trade.channel=='Wechat'"/> ng-if="trade.channel=='rpaypmt_dd'" />
<img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay" ng-if="trade.channel=='Bestpay'"/> <img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo"
<img src="/static/images/alipay_sign.png" uib-tooltip="Alipay" ng-if="trade.channel=='Alipay'"/> ng-if="trade.channel=='Znyoo'" />
<img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline" ng-if="trade.channel=='AlipayOnline'"/> <img src="/static/images/wechatpay_sign.png" uib-tooltip="WechatPay"
<img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/> ng-if="trade.channel=='Wechat'" />
<img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> <img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay"
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" ng-if="trade.channel=='Rpay'"/> ng-if="trade.channel=='Bestpay'" />
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/> <img src="/static/images/alipay_sign.png" uib-tooltip="Alipay"
<img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/> ng-if="trade.channel=='Alipay'" />
{{trade.order_id}} <img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline"
</td> ng-if="trade.channel=='AlipayOnline'" />
<td> <img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" ng-if="trade.channel=='jd'" />
{{trade.total_amount|currency:trade.currency+' '}} <img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" ng-if="trade.channel=='hf'" />
<a ng-if="trade.refund_fee" class="text-danger" role="button" <img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+"
ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a> ng-if="trade.channel=='Rpay'" />
</td> <img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay"
<td ng-bind="trade.display_amount|currency:trade.currency"></td> ng-if="trade.channel=='Yeepay'" />
<td ng-bind="trade.clearing_amount|currency:'AUD '"></td> <img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay"
<td> ng-if="trade.channel=='LakalaPay'" />
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')" ng-bind="trade.exchange_rate"></span> <img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay CN"
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')" > - </span> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_cn'" />
</td>
<td ng-bind="trade.status|tradeStatus"></td> <img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay SG"
<td ng-bind="trade.create_time"></td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_sg'" />
<td ng-bind="trade.gateway|tradeGateway"></td>
<td> <img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay MO"
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)" title="Detail"> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_mo'" />
<i class="fa fa-list-alt"></i>
</a> <img src="/static/images/alipay-hk.png" style="height: 20px" uib-tooltip="Alipay HK/支付宝香港"
<a role="button" ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && ('do_refund'|withFunc)" ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_hk'" />
class="text-bold text-danger"
ng-click="newRefund(trade.order_id)" title="Refund"> <img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay LU"
<i class="fa fa-undo"></i> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_lu'" />
</a>
</td> <img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay GB"
</tr> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_gb'" />
<img src="/static/images/alipay_sign.png" style="height: 20px" uib-tooltip="Alipay US"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_us'" />
<img src="/static/images/paytm-logo.png" style="height: 20px" uib-tooltip="Patytm Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='paytm'" />
<img src="/static/images/kakaopay.png" style="height: 20px" uib-tooltip="Kakao Pay"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='kakaopay'" />
<img src="/static/images/truemoney-logo.png" style="height: 20px" uib-tooltip="TrueMoney"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='truemoney'" />
<img src="/static/images/ezlink-logo.png" style="height: 20px" uib-tooltip="EZLINK"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='ezlink'" />
<img src="/static/images/gcash-logo.png" style="height: 20px" uib-tooltip="GCash"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='gcash'" />
<img src="/static/images/TNGeWalletLogo.png" style="height: 20px" uib-tooltip="TNG"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='tng'" />
<img src="/static/images/dana-wallet-logo.png" style="height: 20px"
uib-tooltip="Dana Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='dana'" />
<img src="/static/images/easypasia-logo.png" style="height: 20px" uib-tooltip="EasyPasia"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='easy_paisa'" />
<img src="/static/images/bkash-logo.png" style="height: 20px" uib-tooltip="bKash Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='bkash'" />
<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'" />
{{trade.order_id}}
</td>
<td>
{{trade.total_amount|currency:trade.currency+' '}}
<a ng-if="trade.refund_fee" class="text-danger" role="button"
ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a>
</td>
<td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td ng-bind="trade.clearing_amount|currency:'AUD '"></td>
<td>
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')"
ng-bind="trade.exchange_rate"></span>
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')"> - </span>
</td>
<td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td>
<td ng-bind="trade.gateway|tradeGateway"></td>
<td>
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)" title="Detail">
<i class="fa fa-list-alt"></i>
</a>
<a role="button"
ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && ('do_refund'|withFunc)"
class="text-bold text-danger" ng-click="newRefund(trade.order_id)" title="Refund">
<i class="fa fa-undo"></i>
</a>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<uib-pagination ng-if="tradeLogs.length" <uib-pagination ng-if="tradeLogs.length" class="pagination" total-items="pagination.totalCount"
class="pagination" boundary-links="true" ng-model="pagination.page" items-per-page="pagination.limit" max-size="10"
total-items="pagination.totalCount" ng-change="loadTradeLogs()" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;"
boundary-links="true" last-text="&raquo;"></uib-pagination>
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadTradeLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div> <div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div>
</div> </div>
</div> </div>

@ -218,21 +218,21 @@
<label class="col-xs-6 control-label">Alipay|支付宝</label> <label class="col-xs-6 control-label">Alipay|支付宝</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch
switch-change="toggleChannel('alipay')"> ng-change="toggleChannel('alipay')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">WeChat|微信</label> <label class="col-xs-6 control-label">WeChat|微信</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch
switch-change="toggleChannel('wechat')"> ng-change="toggleChannel('wechat')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">CB BankPay|快捷支付</label> <label class="col-xs-6 control-label">CB BankPay|快捷支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_cb_bankpay" bs-switch
switch-change="toggleChannel('cb_bankpay')"> ng-change="toggleChannel('cb_bankpay')">
</div> </div>
</div> </div>
@ -240,17 +240,23 @@
<label class="col-xs-6 control-label">Card Payment|银行卡支付</label> <label class="col-xs-6 control-label">Card Payment|银行卡支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_card" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_card" bs-switch
switch-change="toggleChannel('rpaypmt_card')"> ng-change="toggleChannel('rpaypmt_card')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Direct Debit|银行账户支付</label> <label class="col-xs-6 control-label">Direct Debit|银行账户支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_dd" bs-switch <input type="checkbox" ng-model="paymentInfo.enable_rpaypmt_dd" bs-switch
switch-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> </div>
</div> </div>
</div> </div>
</div> </div>
@ -370,6 +376,14 @@
</p> </p>
</div> </div>
</div> </div>
<div class="form-group" ng-if="paymentInfo.enable_alipayplus">
<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()">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Gateway Credential</label> <label class="control-label col-sm-2">Gateway Credential</label>
<div class="col-sm-10"> <div class="col-sm-10">

@ -9,23 +9,28 @@
.i-rotate_90 { .i-rotate_90 {
animation: rotate_90 1s forwards; animation: rotate_90 1s forwards;
-webkit-animation: rotate_90 1s forwards; /* Safari and Chrome */ -webkit-animation: rotate_90 1s forwards;
/* Safari and Chrome */
} }
@keyframes rotate_90 { @keyframes rotate_90 {
from { from {
transform: rotate(0deg); transform: rotate(0deg);
} }
to { to {
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
@-webkit-keyframes rotate_90 /* Safari and Chrome */ @-webkit-keyframes rotate_90
{
/* Safari and Chrome */
{
from { from {
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
} }
to { to {
-webkit-transform: rotate(90deg); -webkit-transform: rotate(90deg);
} }
@ -78,6 +83,7 @@
.line_height_ { .line_height_ {
line-height: 22px; line-height: 22px;
} }
.white_content { .white_content {
display: none; display: none;
position: absolute; position: absolute;
@ -86,36 +92,37 @@
padding: 20px; padding: 20px;
border: 1px solid orange; border: 1px solid orange;
background-color: white; background-color: white;
z-index:1002; z-index: 1002;
overflow: auto; overflow: auto;
} }
.white_content::-webkit-scrollbar:vertical { .white_content::-webkit-scrollbar:vertical {
width: 11px; width: 11px;
} }
/*定义滚动条高宽及背景 /*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/ 高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar .white_content::-webkit-scrollbar {
{
-webkit-appearance: none; -webkit-appearance: none;
width:16px; width: 16px;
height:16px; height: 16px;
background-color:#F5F5F5; background-color: #F5F5F5;
} }
/*定义滚动条轨道 /*定义滚动条轨道
内阴影+圆角*/ 内阴影+圆角*/
.white_content::-webkit-scrollbar-track .white_content::-webkit-scrollbar-track {
{ -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3); border-radius: 10px;
border-radius:10px; background-color: #F5F5F5;
background-color:#F5F5F5;
} }
/*定义滑块 /*定义滑块
内阴影+圆角*/ 内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb .white_content::-webkit-scrollbar-thumb {
{ border-radius: 10px;
border-radius:10px; -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3); background-color: #555;
background-color:#555;
} }
</style> </style>
<section class="content-header"> <section class="content-header">
@ -154,8 +161,7 @@
</label> </label>
<div class="col-sm-4 col-xs-8"> <div class="col-sm-4 col-xs-8">
<input class="form-control" placeholder="Keyword" <input class="form-control" placeholder="Keyword"
ng-enter="loadTradeLogs(1)" ng-enter="loadTradeLogs(1)" ng-model="params.searchText">
ng-model="params.searchText">
</div> </div>
</div> </div>
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
@ -163,11 +169,11 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.source=='ALL'}" <a role="button" ng-class="{'bg-primary':params.source=='ALL'}"
ng-click="params.source='ALL';loadTradeLogs(1)">All</a> | ng-click="params.source='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.source=='system'}" <a role="button" ng-class="{'bg-primary':params.source=='system'}"
ng-click="params.source='system';loadTradeLogs(1)">System</a> | ng-click="params.source='system';loadTradeLogs(1)">System</a> |
<a role="button" ng-class="{'bg-primary':params.source=='RP跨境商城'}" <a role="button" ng-class="{'bg-primary':params.source=='RP跨境商城'}"
ng-click="params.source='RP跨境商城';loadTradeLogs(1)">RP跨境商城</a> ng-click="params.source='RP跨境商城';loadTradeLogs(1)">RP跨境商城</a>
</p> </p>
</div> </div>
</div> </div>
@ -176,20 +182,20 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status=='ALL'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL'}"
ng-click="params.status='ALL';loadTradeLogs(1)">All</a> | ng-click="params.status='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PAID'}" <a role="button" ng-class="{'bg-primary':params.status=='PAID'}"
ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a> ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a>
| |
<a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}"
ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All
Refund</a> | Refund</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}"
ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial
Refund</a> | Refund</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}"
ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full
Refund</a> Refund</a>
</p> </p>
</div> </div>
@ -199,21 +205,27 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.channel=='ALL'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALL'}"
ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> | ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}" <a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}"
ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> | ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}"
ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> | ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a> 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=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> | ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay+</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}" <a role="button"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> | 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'}" <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_DD';loadTradeLogs(1)">Direct
Debit</a>
</p> </p>
</div> </div>
</div> </div>
@ -222,55 +234,55 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gateway==null}" <a role="button" ng-class="{'bg-primary':params.gateway==null}"
ng-click="params.gateway=null;loadTradeLogs(1)">All</a> | ng-click="params.gateway=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}"
ng-click="params.gateway=[0,1];initGatewayChild()">Retail ng-click="params.gateway=[0,1];initGatewayChild()">Retail
In-Store</a> | In-Store</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}"
ng-click="params.gateway=[5,6];initGatewayChild()">Retail API</a> | ng-click="params.gateway=[5,6];initGatewayChild()">Retail API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}"
ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> | ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([3])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([3])}"
ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> | ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([4])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([4])}"
ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> | ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([8])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([8])}"
ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> | ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([9])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([9])}"
ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party
Gateway</a> | Gateway</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([10])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([10])}"
ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> | ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([11])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([11])}"
ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> | ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([12])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([12])}"
ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> | ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([13])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([13])}"
ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> | ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([14])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([14])}"
ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a> ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a>
</p> </p>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]"> ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]">
<label class="control-label col-xs-4 col-sm-2">Type of payment</label> <label class="control-label col-xs-4 col-sm-2">Type of payment</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gatewayChild==null}" <a role="button" ng-class="{'bg-primary':params.gatewayChild==null}"
ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> | ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==1}" ng-class="{'bg-primary':params.gatewayChild==1}"
ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a> ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==0}" ng-class="{'bg-primary':params.gatewayChild==0}"
ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a> ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==6}" ng-class="{'bg-primary':params.gatewayChild==6}"
ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a> ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==5}" ng-class="{'bg-primary':params.gatewayChild==5}"
ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a> ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a>
</p> </p>
</div> </div>
</div> </div>
@ -280,39 +292,39 @@
<div class="form-control-static form-inline"> <div class="form-control-static form-inline">
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-from-input" <input class="form-control" id="date-from-input"
ng-model="params.datefrom" ng-model="params.datefrom" uib-datepicker-popup size="10"
uib-datepicker-popup size="10" placeholder="From" placeholder="From" is-open="dateBegin.open"
is-open="dateBegin.open" ng-click="dateBegin.open=true" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.dateto||today}"> datepicker-options="{maxDate:params.dateto||today}">
</div> </div>
~ ~
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-to-input" <input class="form-control" id="date-to-input"
ng-model="params.dateto" ng-model="params.dateto" uib-datepicker-popup size="10"
uib-datepicker-popup size="10" placeholder="To" placeholder="To" is-open="dateTo.open"
is-open="dateTo.open" ng-click="dateTo.open=true" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.datefrom,maxDate:today}"> datepicker-options="{minDate:params.datefrom,maxDate:today}">
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseToday()">Today</a> ng-click="chooseToday()">Today</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterday()">Yesterday</a> ng-click="chooseYesterday()">Yesterday</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a> ng-click="chooseLast7Days()">Last 7 Days</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a> ng-click="thisMonth()">This Month</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a> ng-click="lastMonth()">Last Month</a>
</div> </div>
</div> </div>
@ -320,148 +332,160 @@
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch"> ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static" ng-if="clients.length<20"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
|&nbsp; |&nbsp;
<a role="button" <a role="button"
ng-class="{'bg-primary':sub.client_id==chooseClientId}" ng-class="{'bg-primary':sub.client_id==chooseClientId}"
ng-click="chooseClient(sub)">{{sub.short_name}}</a> ng-click="chooseClient(sub)">{{sub.short_name}}</a>
&nbsp; &nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20"> <p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;"> <label
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly> ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)"
style="cursor: pointer;">
<input ng-model="choseSubClientNow"
style="border:none;cursor: pointer;" readonly>
</label> </label>
</p> </p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)"> <div id="light" class="white_content" ng-if="more20ChoseSubClient"
style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row"> <div class="row">
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8"> <div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword" <input class="form-control" placeholder="Keyword"
ng-model="subSearchText"> ng-model="subSearchText">
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)"> <button class="btn btn-success" type="button"
ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search <i class="fa fa-search"></i> Search
</button> </button>
</div> </div>
</div> </div>
<div class="col-sm-12 table-responsive"> <div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px"> <div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px"> <table
class="table table-bordered table-striped table-hover"
style="padding: 6px">
<thead> <thead>
<tr> <tr>
<th>Partner Code</th> <th>Partner Code</th>
<th>Partner Name</th> <th>Partner Name</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="subPartner in subClientTable1"> <tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer"> <td ng-click="showClient(subPartner); toShow = !toShow"
{{subPartner.client_moniker}} style="cursor:pointer">
</td> {{subPartner.client_moniker}}
<td ng-bind="subPartner.short_name"></td> </td>
<td> <td ng-bind="subPartner.short_name"></td>
<button role="button" class="btn btn-info" title="Add Search" <td>
<button role="button" class="btn btn-info"
title="Add Search"
style="padding: 1px 6px;" style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)"> ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</button> </button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="col-sm-6" style="padding: 0 2px"> <div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px"> <table
class="table table-bordered table-striped table-hover"
style="padding: 6px">
<thead> <thead>
<tr> <tr>
<th>Partner Code</th> <th>Partner Code</th>
<th>Partner Name</th> <th>Partner Name</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="subPartner in subClientTable2"> <tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer"> <td ng-click="showClient(subPartner); toShow = !toShow"
{{subPartner.client_moniker}} style="cursor:pointer">
</td> {{subPartner.client_moniker}}
<td ng-bind="subPartner.short_name"></td> </td>
<td> <td ng-bind="subPartner.short_name"></td>
<button role="button" class="btn btn-info" title="Add Search" <td>
<button role="button" class="btn btn-info"
title="Add Search"
style="padding: 1px 6px;" style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)"> ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</button> </button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="box-footer" ng-if="clients.length" style="float: right;"> <div class="box-footer" ng-if="clients.length"
style="float: right;">
<uib-pagination class="pagination" <uib-pagination class="pagination"
total-items="subClientPagination.totalCount" total-items="subClientPagination.totalCount"
boundary-links="true" boundary-links="true" ng-model="subClientPagination.page"
ng-model="subClientPagination.page" items-per-page="subClientPagination.limit" max-size="10"
items-per-page="subClientPagination.limit" ng-change="searchSubClients('',subClientPagination.page)"
max-size="10" previous-text="&lsaquo;" next-text="&rsaquo;"
ng-change="searchSubClients('',subClientPagination.page)" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}} Total Records:{{subClientPagination.totalCount}};Total
Pages:{{subClientPagination.totalPages}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button> <button type="button" class="btn btn-danger"
ng-click="checkSubClientChoseShow('')">Cancel</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="level3Clients && showLevel3Clients && !currentUser.client.hide_sub_mch"> ng-if="level3Clients && showLevel3Clients && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub-Partner of <label class="control-label col-xs-4 col-sm-2">Sub-Partner of
sub-partners</label> sub-partners</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':isLevel3All}" <a role="button" ng-class="{'bg-primary':isLevel3All}"
ng-click="chooseLevel3Client('all')">All</a> ng-click="chooseLevel3Client('all')">All</a>
<label ng-repeat="sub in level3Clients"> <label ng-repeat="sub in level3Clients">
|&nbsp; |&nbsp;
<a role="button" <a role="button"
ng-class="{'bg-primary':sub.client_id==chooseLevel3ClientId}" ng-class="{'bg-primary':sub.client_id==chooseLevel3ClientId}"
ng-click="chooseLevel3Client(sub)">{{sub.short_name}}</a> ng-click="chooseLevel3Client(sub)">{{sub.short_name}}</a>
&nbsp; &nbsp;
</label> </label>
</p> </p>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="deviceIds.length && !currentUser.client.hide_sub_mch"> ng-if="deviceIds.length && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Third Device</label> <label class="control-label col-xs-4 col-sm-2">Third Device</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':order_device_isAll}" <a role="button" ng-class="{'bg-primary':order_device_isAll}"
ng-click="chooseDeviceIds('all')">All</a> ng-click="chooseDeviceIds('all')">All</a>
<label ng-repeat="dev in deviceIds"> <label ng-repeat="dev in deviceIds">
|&nbsp;<a role="button" |&nbsp;<a role="button"
ng-class="{'bg-primary':dev.dev_id==choose_order_device_id}" ng-class="{'bg-primary':dev.dev_id==choose_order_device_id}"
ng-click="chooseDeviceIds(dev.dev_id)">{{dev.dev_id}}</a>&nbsp; ng-click="chooseDeviceIds(dev.dev_id)">{{dev.dev_id}}</a>&nbsp;
</label> </label>
</p> </p>
</div> </div>
@ -471,11 +495,11 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':device_isAll}" <a role="button" ng-class="{'bg-primary':device_isAll}"
ng-click="chooseDevices('all')">All</a> ng-click="chooseDevices('all')">All</a>
<label ng-repeat="device in devices"> <label ng-repeat="device in devices">
|&nbsp;<a role="button" |&nbsp;<a role="button"
ng-class="{'bg-primary':device.dev_id==chooseDevice_id}" ng-class="{'bg-primary':device.dev_id==chooseDevice_id}"
ng-click="chooseDevices(device.dev_id)">{{device.remark}}</a>&nbsp; ng-click="chooseDevices(device.dev_id)">{{device.remark}}</a>&nbsp;
</label> </label>
</p> </p>
</div> </div>
@ -498,7 +522,7 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Transaction Amount</span> <span class="info-box-text">Transaction Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.paid_fee|currency:'AUD '"></span> ng-bind="analysis.paid_fee|currency:'AUD '"></span>
<span class="small">( {{analysis.order_count}} Orders )</span> <span class="small">( {{analysis.order_count}} Orders )</span>
</div> </div>
</div> </div>
@ -511,30 +535,31 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Input Amount</span> <span class="info-box-text">Input Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.display_amount|currency:'AUD '"></span> ng-bind="analysis.display_amount|currency:'AUD '"></span>
<span class="small"> ( {{analysis.pre_display_amount | currency:'pre authorization '}} )</span> <span class="small"> ( {{analysis.pre_display_amount | currency:'pre
authorization '}} )</span>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-3 col-sm-6 col-xs-12" ng-if="analysis.cny_display_amount"> <div class="col-md-3 col-sm-6 col-xs-12" ng-if="analysis.cny_display_amount">
<div class="info-box info_box_bottom" <div class="info-box info_box_bottom"
ng-class="{'line_height':analysis.pre_display_amount||analysis.pre_cny_display_amount}"> ng-class="{'line_height':analysis.pre_display_amount||analysis.pre_cny_display_amount}">
<span class="info-box-icon bg-aqua box-icon_small"><i <span class="info-box-icon bg-aqua box-icon_small"><i
class="ion ion-social-usd"></i></span> class="ion ion-social-usd"></i></span>
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Input Amount</span> <span class="info-box-text">Input Amount</span>
<span class="info-box-number box-number_font" style="margin-bottom: -3px;" <span class="info-box-number box-number_font" style="margin-bottom: -3px;"
ng-class="{line_height_:!analysis.pre_display_amount}" ng-class="{line_height_:!analysis.pre_display_amount}"
ng-bind="analysis.display_amount|currency:'AUD '"></span> ng-bind="analysis.display_amount|currency:'AUD '"></span>
<span style="font-size: 10px;line-height: 10px" <span style="font-size: 10px;line-height: 10px"
ng-if="analysis.pre_display_amount"> ng-if="analysis.pre_display_amount">
( {{analysis.pre_display_amount | currency:'pre authorization '}} ) ( {{analysis.pre_display_amount | currency:'pre authorization '}} )
</span> </span>
<span class="info-box-number box-number_font" style="margin-bottom: -3px;" <span class="info-box-number box-number_font" style="margin-bottom: -3px;"
ng-if="analysis.cny_display_amount" ng-if="analysis.cny_display_amount"
ng-bind="analysis.cny_display_amount|currency:'CNY '"></span> ng-bind="analysis.cny_display_amount|currency:'CNY '"></span>
<span style="font-size: 10px;line-height: 10px" <span style="font-size: 10px;line-height: 10px"
ng-if="analysis.pre_cny_display_amount"> ng-if="analysis.pre_cny_display_amount">
( {{analysis.pre_cny_display_amount | currency:'pre authorization '}} ) ( {{analysis.pre_cny_display_amount | currency:'pre authorization '}} )
</span> </span>
</div> </div>
@ -547,9 +572,9 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Refund Amount</span> <span class="info-box-text">Refund Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.refund_fee|currency:'AUD '"></span> ng-bind="analysis.refund_fee|currency:'AUD '"></span>
<span class=small" ng-if="analysis.pre_refund_fee"> <span class=small" ng-if="analysis.pre_refund_fee">
({{analysis.pre_refund_fee|currency:'pre authorization '}}) ({{analysis.pre_refund_fee|currency:'pre authorization '}})
</span> </span>
</div> </div>
</div> </div>
@ -561,7 +586,7 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">CUSTOMERS</span> <span class="info-box-text">CUSTOMERS</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.customers"></span> ng-bind="analysis.customers"></span>
</div> </div>
</div> </div>
</div> </div>
@ -572,132 +597,194 @@
<div class="box-header"> <div class="box-header">
<h3 class="box-title" style="display: inherit">Orders <h3 class="box-title" style="display: inherit">Orders
<span style="float: right;font-size: 14px;"> <span style="float: right;font-size: 14px;">
<span>Pre Authorization:<i class="fa fa-stop" aria-hidden="true" <span>Pre Authorization:<i class="fa fa-stop" aria-hidden="true"
style="color: #fff2a5"></i></span> style="color: #fff2a5"></i></span>
<span ng-if="currentUser.role == 2 || currentUser.role == 1"> <span ng-if="currentUser.role == 2 || currentUser.role == 1">
<button class="btn btn-warning btn-sm" type="button" <button class="btn btn-warning btn-sm" type="button"
ng-click="fullReleasePreAuth()">Release All Pre-Auth</button> ng-click="fullReleasePreAuth()">Release All Pre-Auth</button>
</span> </span>
</span> </span>
</h3> </h3>
</div> </div>
<div class="box-body table-responsive"> <div class="box-body table-responsive">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>Client Moniker</th> <th>Client Moniker</th>
<th>Short Name</th> <th>Short Name</th>
<th>Client Order ID</th> <th>Client Order ID</th>
<th>Order ID</th> <th>Order ID</th>
<th>Amount</th> <th>Amount</th>
<th>Input Amount</th> <th>Input Amount</th>
<th>AUD Amount</th> <th>AUD Amount</th>
<th style="min-width: 90px">Settle Amount</th> <th style="min-width: 90px">Settle Amount</th>
<th>Exchange Rate</th> <th>Exchange Rate</th>
<th>Status</th> <th>Status</th>
<th>Create Time</th> <th>Create Time</th>
<th>Gateway</th> <th>Gateway</th>
<th>Order Detail</th> <th>Order Detail</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}"> <tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}">
<td ng-bind="trade.client_moniker"></td> <td ng-bind="trade.client_moniker"></td>
<td ng-bind="trade.short_name"></td> <td ng-bind="trade.short_name"></td>
<td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td> <td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td>
<td> <td>
<img src="/static/images/clearing-icon.png" uib-tooltip="clearing" <img src="/static/images/clearing-icon.png" uib-tooltip="clearing"
ng-if="trade.clearing_status=='1'"/> ng-if="trade.clearing_status=='1'" />
<i class="fa fa-check-circle-o text-danger" uib-tooltip="Refund Audition Required" <i class="fa fa-check-circle-o text-danger"
ng-if="trade.audition"></i> uib-tooltip="Refund Audition Required" ng-if="trade.audition"></i>
<img src="/static/images/royalpay_sign_s.png" uib-tooltip="RoyalPay" <img src="/static/images/royalpay_sign_s.png" uib-tooltip="RoyalPay"
ng-if="trade.source=='system'"/> ng-if="trade.source=='system'" />
<img src="/static/images/yangmaimai_sign.png" uib-tooltip="RP跨境商城" <img src="/static/images/yangmaimai_sign.png" uib-tooltip="RP跨境商城"
ng-if="trade.source=='RP跨境商城'"/> ng-if="trade.source=='RP跨境商城'" />
<img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo" <img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo"
ng-if="trade.channel=='Znyoo'"/> ng-if="trade.channel=='Znyoo'" />
<img src="/static/images/wechatpay_sign.png" uib-tooltip="Wechat Pay" <img src="/static/images/wechatpay_sign.png" uib-tooltip="Wechat Pay"
ng-if="trade.channel=='Wechat'"/> ng-if="trade.channel=='Wechat'" />
<img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay" alt="BestPay" <img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay" alt="BestPay"
ng-if="trade.channel=='Bestpay'"/> ng-if="trade.channel=='Bestpay'" />
<img src="/static/images/alipay_sign.png" uib-tooltip="Alipay" alt="Alipay" <img src="/static/images/alipay_sign.png" uib-tooltip="Alipay" alt="Alipay"
ng-if="trade.channel=='Alipay'"/> ng-if="trade.channel=='Alipay'" />
<img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline" <img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline"
alt="AlipayOnline" ng-if="trade.channel=='AlipayOnline'"/> alt="AlipayOnline" ng-if="trade.channel=='AlipayOnline'" />
<img src="/static/images/jd_sign.png" uib-tooltip="JD Pay" <img src="/static/images/jd_sign.png" uib-tooltip="JD Pay"
ng-if="trade.channel=='jd'"/> ng-if="trade.channel=='jd'" />
<img src="/static/images/hf_sign.png" uib-tooltip="HF Pay" <img src="/static/images/hf_sign.png" uib-tooltip="HF Pay"
ng-if="trade.channel=='hf'"/> ng-if="trade.channel=='hf'" />
<img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+" <img src="/static/images/rpayplus_sign.png" uib-tooltip="RPay+"
ng-if="trade.channel=='Rpay'"/> ng-if="trade.channel=='Rpay'" />
<img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay" <img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay"
ng-if="trade.channel=='Yeepay'"/> ng-if="trade.channel=='Yeepay'" />
<img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay" <img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay"
ng-if="trade.channel=='LakalaPay'"/> ng-if="trade.channel=='LakalaPay'" />
<img src="/static/images/card_payment_sign.png" <img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment"
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/> ng-if="trade.channel=='rpaypmt_card'" />
<img src="/static/images/direct_debit_sign.png" <img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit"
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/> ng-if="trade.channel=='rpaypmt_dd'" />
{{trade.order_id}}<span <img src="/static/images/alipay_sign.png" style="height: 20px"
ng-if="trade.source!='system' && trade.source!=null && trade.incremental_surcharge != null"><i uib-tooltip="Alipay CN"
class="fa fa-question-circle-o" uib-tooltip-html="trade.htmlTooltip"></i></span> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_cn'" />
</td>
<td> <img src="/static/images/alipay_sign.png" style="height: 20px"
{{trade.total_amount|currency:trade.currency+' '}} uib-tooltip="Alipay SG"
<a ng-if="trade.refund_fee" class="text-danger" role="button" ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_sg'" />
ng-click="showPRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a>
</td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<td ng-bind="trade.display_amount|currency:trade.currency"></td> uib-tooltip="Alipay MO"
<td ng-bind="trade.clearing_amount|currency:'AUD '"></td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_mo'" />
<td ng-bind="trade.settle_amount|currency:'AUD '"></td>
<td> <img src="/static/images/alipay-hk.png" style="height: 20px"
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')" uib-tooltip="Alipay HK/支付宝香港"
ng-bind="trade.exchange_rate"></span> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_hk'" />
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')"> - </span>
</td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<td ng-bind="trade.status|tradeStatus"></td> uib-tooltip="Alipay LU"
<td ng-bind="trade.create_time"></td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_lu'" />
<td ng-bind="trade.gateway|tradeGateway"></td>
<td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<span ng-bind="(trade.order_detail||'-')|limitToWithEllipsis" uib-tooltip="Alipay GB"
uib-tooltip="{{trade.order_detail}}" ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_gb'" />
uib-tooltip-enable="{{trade.order_detail}}"></span>
</td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<td> uib-tooltip="Alipay US"
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)" title="Detail"> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_us'" />
<i class="fa fa-list-alt"></i>
</a> <img src="/static/images/paytm-logo.png" style="height: 20px"
<a role="button" uib-tooltip="Patytm Wallet"
ng-if="trade.clearing_status==2 && trade.client_id==currentUser.client_id" ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='paytm'" />
class="text-bold text-primary"
ng-click="releasePreAuth(trade.order_id)" title="Release Pre-Authorization"> <img src="/static/images/kakaopay.png" style="height: 20px"
<i class="fa fa-unlock-alt"></i> uib-tooltip="Kakao Pay"
</a> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='kakaopay'" />
<a role="button"
ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && currentUser.client.enable_refund" <img src="/static/images/truemoney-logo.png" style="height: 20px"
class="text-bold text-danger" ng-click="newPRefund(trade.order_id)" uib-tooltip="TrueMoney"
title="Refund"> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='truemoney'" />
<i class="fa fa-undo"></i>
</a> <img src="/static/images/ezlink-logo.png" style="height: 20px"
</td> uib-tooltip="EZLINK"
</tr> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='ezlink'" />
<img src="/static/images/gcash-logo.png" style="height: 20px"
uib-tooltip="GCash"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='gcash'" />
<img src="/static/images/TNGeWalletLogo.png" style="height: 20px"
uib-tooltip="TNG"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='tng'" />
<img src="/static/images/dana-wallet-logo.png" style="height: 20px"
uib-tooltip="Dana Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='dana'" />
<img src="/static/images/easypasia-logo.png" style="height: 20px"
uib-tooltip="EasyPasia"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='easy_paisa'" />
<img src="/static/images/bkash-logo.png" style="height: 20px"
uib-tooltip="bKash Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='bkash'" />
<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'" />
{{trade.order_id}}<span
ng-if="trade.source!='system' && trade.source!=null && trade.incremental_surcharge != null"><i
class="fa fa-question-circle-o"
uib-tooltip-html="trade.htmlTooltip"></i></span>
</td>
<td>
{{trade.total_amount|currency:trade.currency+' '}}
<a ng-if="trade.refund_fee" class="text-danger" role="button"
ng-click="showPRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a>
</td>
<td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td ng-bind="trade.clearing_amount|currency:'AUD '"></td>
<td ng-bind="trade.settle_amount|currency:'AUD '"></td>
<td>
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')"
ng-bind="trade.exchange_rate"></span>
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')"> - </span>
</td>
<td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td>
<td ng-bind="trade.gateway|tradeGateway"></td>
<td>
<span ng-bind="(trade.order_detail||'-')|limitToWithEllipsis"
uib-tooltip="{{trade.order_detail}}"
uib-tooltip-enable="{{trade.order_detail}}"></span>
</td>
<td>
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)"
title="Detail">
<i class="fa fa-list-alt"></i>
</a>
<a role="button"
ng-if="trade.clearing_status==2 && trade.client_id==currentUser.client_id"
class="text-bold text-primary" ng-click="releasePreAuth(trade.order_id)"
title="Release Pre-Authorization">
<i class="fa fa-unlock-alt"></i>
</a>
<a role="button"
ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && currentUser.client.enable_refund"
class="text-bold text-danger" ng-click="newPRefund(trade.order_id)"
title="Refund">
<i class="fa fa-undo"></i>
</a>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-footer" ng-if="tradeLogs.length"> <div class="box-footer" ng-if="tradeLogs.length">
<uib-pagination class="pagination" <uib-pagination class="pagination" total-items="pagination.totalCount" boundary-links="true"
total-items="pagination.totalCount" ng-model="pagination.page" items-per-page="pagination.limit" max-size="10"
boundary-links="true" ng-change="loadTradeLogs()" previous-text="&lsaquo;" next-text="&rsaquo;"
ng-model="pagination.page" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
items-per-page="pagination.limit"
max-size="10"
ng-change="loadTradeLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row"> <div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total <div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}} Pages:{{pagination.totalPages}}
@ -708,4 +795,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

@ -95,24 +95,23 @@
</label> </label>
<div class="col-sm-4 col-xs-8"> <div class="col-sm-4 col-xs-8">
<input class="form-control" placeholder="Keyword" <input class="form-control" placeholder="Keyword"
ng-enter="loadTradeLogs(1)" ng-enter="loadTradeLogs(1)" ng-model="params.searchText">
ng-model="params.searchText">
</div> </div>
<div class="col-sm-6 col-xs-8"> <div class="col-sm-6 col-xs-8">
<div ng-if="orgs" class="col-sm-6"> <div ng-if="orgs" class="col-sm-6">
<select id="org-clild" class="form-control" ng-model="params.org_id" <select id="org-clild" class="form-control" ng-model="params.org_id"
ng-options="org.org_id as org.name group by org.type for org in orgs" ng-options="org.org_id as org.name group by org.type for org in orgs"
ng-change="params.org_id2 = '';loadOrgs();loadTradeLogs(1)"> ng-change="params.org_id2 = '';loadOrgs();loadTradeLogs(1)">
<option value="">ALL Organizations</option> <option value="">ALL Organizations</option>
</select> </select>
</div> </div>
<div ng-if="((orgs_child.length > 1) && ('1000011'|withRole))&&params.org_id || ((orgs_child.length > 0) && ('1000000000000'|withRole))" <div ng-if="((orgs_child.length > 1) && ('1000011'|withRole))&&params.org_id || ((orgs_child.length > 0) && ('1000000000000'|withRole))"
class="col-sm-6"> class="col-sm-6">
<select id="org-select" class="form-control" ng-model="params.org_id2" <select id="org-select" class="form-control" ng-model="params.org_id2"
ng-options="org.org_id as org.name group by org.org_type for org in orgs_child" ng-options="org.org_id as org.name group by org.org_type for org in orgs_child"
ng-change="loadTradeLogs(1)"> ng-change="loadTradeLogs(1)">
<option value="">{{org2}}</option> <option value="">{{org2}}</option>
</select> </select>
</div> </div>
@ -147,11 +146,11 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.source=='ALL'}" <a role="button" ng-class="{'bg-primary':params.source=='ALL'}"
ng-click="params.source='ALL';loadTradeLogs(1)">All</a> | ng-click="params.source='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.source=='system'}" <a role="button" ng-class="{'bg-primary':params.source=='system'}"
ng-click="params.source='system';loadTradeLogs(1)">System</a> | ng-click="params.source='system';loadTradeLogs(1)">System</a> |
<a role="button" ng-class="{'bg-primary':params.source=='RP跨境商城'}" <a role="button" ng-class="{'bg-primary':params.source=='RP跨境商城'}"
ng-click="params.source='RP跨境商城';loadTradeLogs(1)">RP跨境商城</a> ng-click="params.source='RP跨境商城';loadTradeLogs(1)">RP跨境商城</a>
</p> </p>
</div> </div>
</div> </div>
@ -160,20 +159,20 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.status=='ALL'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL'}"
ng-click="params.status='ALL';loadTradeLogs(1)">All</a> | ng-click="params.status='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.status=='PAID'}" <a role="button" ng-class="{'bg-primary':params.status=='PAID'}"
ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a> ng-click="params.status='PAID';loadTradeLogs(1)">Payment Success</a>
| |
<a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}" <a role="button" ng-class="{'bg-primary':params.status=='ALL_REFUNDED'}"
ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All ng-click="params.status='ALL_REFUNDED';loadTradeLogs(1)">All
Refund</a> | Refund</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}" ng-class="{'bg-primary':params.status=='PARTIAL_REFUNDED'}"
ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial ng-click="params.status='PARTIAL_REFUNDED';loadTradeLogs(1)">Partial
Refund</a> | Refund</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}" ng-class="{'bg-primary':params.status=='FULL_REFUNDED'}"
ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full ng-click="params.status='FULL_REFUNDED';loadTradeLogs(1)">Full
Refund</a> Refund</a>
</p> </p>
</div> </div>
@ -183,31 +182,38 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.channel=='ALL'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALL'}"
ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> | ng-click="params.channel='ALL';loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}" <a role="button" ng-class="{'bg-primary':params.channel=='WECHAT'}"
ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> | ng-click="params.channel='WECHAT';loadTradeLogs(1)">Wechat Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='ALIPAY'}"
ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> | ng-click="params.channel='ALIPAY';loadTradeLogs(1)">Alipay</a> |
<a role="button" <a role="button"
ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}" ng-class="{'bg-primary':params.channel=='ALIPAYONLINE'}"
ng-click="params.channel='ALIPAYONLINE';loadTradeLogs(1)">AlipayOnline</a> 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'}" <a role="button" ng-class="{'bg-primary':params.channel=='BESTPAY'}"
ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> | ng-click="params.channel='BESTPAY';loadTradeLogs(1)">BestPay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='JD'}" <a role="button" ng-class="{'bg-primary':params.channel=='JD'}"
ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> | ng-click="params.channel='JD';loadTradeLogs(1)">JD Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='HF'}" <a role="button" ng-class="{'bg-primary':params.channel=='HF'}"
ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> | ng-click="params.channel='HF';loadTradeLogs(1)">HF Pay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='RPAY'}"
ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> | ng-click="params.channel='RPAY';loadTradeLogs(1)">RPay +</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='YEEPAY'}"
ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> | ng-click="params.channel='YEEPAY';loadTradeLogs(1)">Yeepay</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}" <a role="button" ng-class="{'bg-primary':params.channel=='LAKALAPAY'}"
ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a> | ng-click="params.channel='LAKALAPAY';loadTradeLogs(1)">LakalaPay</a>
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}" |
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card Payment</a> | <a role="button"
ng-class="{'bg-primary':params.channel=='RPAYPMT_CARD'}"
ng-click="params.channel='RPAYPMT_CARD';loadTradeLogs(1)">Card
Payment</a> |
<a role="button" ng-class="{'bg-primary':params.channel=='RPAYPMT_DD'}" <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_DD';loadTradeLogs(1)">Direct
Debit</a>
</p> </p>
</div> </div>
</div> </div>
@ -216,55 +222,57 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gateway==null}" <a role="button" ng-class="{'bg-primary':params.gateway==null}"
ng-click="params.gateway=null;loadTradeLogs(1)">All</a> | ng-click="params.gateway=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([0,1])}"
ng-click="params.gateway=[0,1];initGatewayChild()">Retail In-Store</a> ng-click="params.gateway=[0,1];initGatewayChild()">Retail
In-Store</a>
| |
<a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([5,6])}"
ng-click="params.gateway=[5,6];loadTradeLogs(1);initGatewayChild()">Retail API</a> | ng-click="params.gateway=[5,6];loadTradeLogs(1);initGatewayChild()">Retail
API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([2,7])}"
ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> | ng-click="params.gateway=[2,7];loadTradeLogs(1)">QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([3])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([3])}"
ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> | ng-click="params.gateway=[3];loadTradeLogs(1)">Online API</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([4])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([4])}"
ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> | ng-click="params.gateway=[4];loadTradeLogs(1)">WeChat HTML5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([8])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([8])}"
ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> | ng-click="params.gateway=[8];loadTradeLogs(1)">Mobile H5</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([9])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([9])}"
ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party ng-click="params.gateway=[9];loadTradeLogs(1)">Third Party
Gateway</a> | Gateway</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([10])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([10])}"
ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> | ng-click="params.gateway=[10];loadTradeLogs(1)">APP</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([11])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([11])}"
ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> | ng-click="params.gateway=[11];loadTradeLogs(1)">Share Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([12])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([12])}"
ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> | ng-click="params.gateway=[12];loadTradeLogs(1)">MiniProgram</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([13])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([13])}"
ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> | ng-click="params.gateway=[13];loadTradeLogs(1)">Native QR Code</a> |
<a role="button" ng-class="{'bg-primary':gatewaySelected([14])}" <a role="button" ng-class="{'bg-primary':gatewaySelected([14])}"
ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a> ng-click="params.gateway=[14];loadTradeLogs(1)">Share Link</a>
</p> </p>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]"> ng-if="params.gateway.sort().toString()==[0,1] || params.gateway.sort().toString()==[5,6]">
<label class="control-label col-xs-4 col-sm-2">Type of payment</label> <label class="control-label col-xs-4 col-sm-2">Type of payment</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':params.gatewayChild==null}" <a role="button" ng-class="{'bg-primary':params.gatewayChild==null}"
ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> | ng-click="params.gatewayChild=null;loadTradeLogs(1)">All</a> |
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==1}" ng-class="{'bg-primary':params.gatewayChild==1}"
ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a> ng-click="params.gatewayChild=1;loadTradeLogs(1)">线下B端二维码 |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[0,1]" <a role="button" ng-if="params.gateway.sort().toString()==[0,1]"
ng-class="{'bg-primary':params.gatewayChild==0}" ng-class="{'bg-primary':params.gatewayChild==0}"
ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a> ng-click="params.gatewayChild=0;loadTradeLogs(1)">线下C端支付码</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==6}" ng-class="{'bg-primary':params.gatewayChild==6}"
ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a> ng-click="params.gatewayChild=6;loadTradeLogs(1)">线下网关(B端二维码) |</a>
<a role="button" ng-if="params.gateway.sort().toString()==[5,6]" <a role="button" ng-if="params.gateway.sort().toString()==[5,6]"
ng-class="{'bg-primary':params.gatewayChild==5}" ng-class="{'bg-primary':params.gatewayChild==5}"
ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a> ng-click="params.gatewayChild=5;loadTradeLogs(1)">线下网关(C端支付码)</a>
</p> </p>
</div> </div>
</div> </div>
@ -274,39 +282,39 @@
<div class="form-control-static form-inline"> <div class="form-control-static form-inline">
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-from-input" <input class="form-control" id="date-from-input"
ng-model="params.datefrom" ng-model="params.datefrom" uib-datepicker-popup size="10"
uib-datepicker-popup size="10" placeholder="From" placeholder="From" is-open="dateBegin.open"
is-open="dateBegin.open" ng-click="dateBegin.open=true" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.dateto||today}"> datepicker-options="{maxDate:params.dateto||today}">
</div> </div>
~ ~
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="date-to-input" <input class="form-control" id="date-to-input"
ng-model="params.dateto" ng-model="params.dateto" uib-datepicker-popup size="10"
uib-datepicker-popup size="10" placeholder="To" placeholder="To" is-open="dateTo.open"
is-open="dateTo.open" ng-click="dateTo.open=true" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.datefrom,maxDate:today}"> datepicker-options="{minDate:params.datefrom,maxDate:today}">
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseToday()">Today</a> ng-click="chooseToday()">Today</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseYesterday()">Yesterday</a> ng-click="chooseYesterday()">Yesterday</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a> ng-click="chooseLast7Days()">Last 7 Days</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a> ng-click="thisMonth()">This Month</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a role="button" class="btn btn-default btn-sm" <a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a> ng-click="lastMonth()">Last Month</a>
</div> </div>
</div> </div>
@ -316,11 +324,11 @@
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a> ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds"> <label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button" |&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}" ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp; ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label> </label>
</p> </p>
</div> </div>
@ -351,7 +359,7 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Transaction Amount</span> <span class="info-box-text">Transaction Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.paid_fee|currency:'AUD'"></span> ng-bind="analysis.paid_fee|currency:'AUD'"></span>
<span class="small">( {{analysis.order_count}} Orders )</span> <span class="small">( {{analysis.order_count}} Orders )</span>
</div> </div>
</div> </div>
@ -363,30 +371,31 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Input Amount</span> <span class="info-box-text">Input Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.display_amount|currency:'AUD '"></span> ng-bind="analysis.display_amount|currency:'AUD '"></span>
<span class="small"> ( {{analysis.pre_display_amount | currency:'pre authorization '}} )</span> <span class="small"> ( {{analysis.pre_display_amount | currency:'pre
authorization '}} )</span>
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-1-5 col-sm-6 col-xs-12" ng-if="analysis.cny_display_amount"> <div class="col-md-1-5 col-sm-6 col-xs-12" ng-if="analysis.cny_display_amount">
<div class="info-box info_box_bottom" <div class="info-box info_box_bottom"
ng-class="{'line_height':analysis.pre_display_amount||analysis.pre_cny_display_amount}"> ng-class="{'line_height':analysis.pre_display_amount||analysis.pre_cny_display_amount}">
<span class="info-box-icon bg-aqua box-icon_small"><i <span class="info-box-icon bg-aqua box-icon_small"><i
class="ion ion-social-usd"></i></span> class="ion ion-social-usd"></i></span>
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Input Amount</span> <span class="info-box-text">Input Amount</span>
<span class="info-box-number box-number_font" style="margin-bottom: -3px;" <span class="info-box-number box-number_font" style="margin-bottom: -3px;"
ng-class="{line_height_:!analysis.pre_display_amount}" ng-class="{line_height_:!analysis.pre_display_amount}"
ng-bind="analysis.display_amount|currency:'AUD '"></span> ng-bind="analysis.display_amount|currency:'AUD '"></span>
<span style="font-size: 8px;line-height: 8px" <span style="font-size: 8px;line-height: 8px"
ng-if="analysis.pre_display_amount"> ng-if="analysis.pre_display_amount">
( {{analysis.pre_display_amount | currency:'pre authorization '}} ) ( {{analysis.pre_display_amount | currency:'pre authorization '}} )
</span> </span>
<span class="info-box-number box-number_font" style="margin-bottom: -3px;" <span class="info-box-number box-number_font" style="margin-bottom: -3px;"
ng-if="analysis.cny_display_amount" ng-if="analysis.cny_display_amount"
ng-bind="analysis.cny_display_amount|currency:'CNY '"></span> ng-bind="analysis.cny_display_amount|currency:'CNY '"></span>
<span style="font-size: 8px;line-height: 8px" <span style="font-size: 8px;line-height: 8px"
ng-if="analysis.pre_cny_display_amount"> ng-if="analysis.pre_cny_display_amount">
( {{analysis.pre_cny_display_amount | currency:'pre authorization '}} ) ( {{analysis.pre_cny_display_amount | currency:'pre authorization '}} )
</span> </span>
</div> </div>
@ -399,9 +408,9 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Refund Amount</span> <span class="info-box-text">Refund Amount</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.refund_fee|currency:'AUD '"></span> ng-bind="analysis.refund_fee|currency:'AUD '"></span>
<span class=small" ng-if="analysis.pre_refund_fee"> <span class=small" ng-if="analysis.pre_refund_fee">
({{analysis.pre_refund_fee|currency:'pre authorization '}}) ({{analysis.pre_refund_fee|currency:'pre authorization '}})
</span> </span>
</div> </div>
</div> </div>
@ -412,8 +421,7 @@
class="ion ion-ios-people"></i></span> class="ion ion-ios-people"></i></span>
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">Merchants</span> <span class="info-box-text">Merchants</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font" ng-bind="analysis.clients"></span>
ng-bind="analysis.clients"></span>
</span> </span>
</div> </div>
</div> </div>
@ -425,7 +433,7 @@
<div class="info-box-content box-content_left"> <div class="info-box-content box-content_left">
<span class="info-box-text">CUSTOMERS</span> <span class="info-box-text">CUSTOMERS</span>
<span class="info-box-number box-number_font" <span class="info-box-number box-number_font"
ng-bind="analysis.customers"></span> ng-bind="analysis.customers"></span>
</div> </div>
</div> </div>
</div> </div>
@ -436,109 +444,173 @@
<div class="box-header"> <div class="box-header">
<h3 class="box-title" style="display: inherit">Trade Orders <h3 class="box-title" style="display: inherit">Trade Orders
<span style="float: right;font-size: 14px;">Pre Authorization:<i class="fa fa-stop" <span style="float: right;font-size: 14px;">Pre Authorization:<i class="fa fa-stop"
aria-hidden="true" aria-hidden="true" style="color: #fff2a5"></i></span>
style="color: #fff2a5"></i></span>
</h3> </h3>
<a hidden class="pull-right text-bold" ng-if="'manual_refund_check'|withFunc" role="button" <a hidden class="pull-right text-bold" ng-if="'manual_refund_check'|withFunc" role="button"
ng-click="confirmOrders()">Manual Confirm Orders</a> ng-click="confirmOrders()">Manual Confirm Orders</a>
</div> </div>
<div class="box-body table-responsive"> <div class="box-body table-responsive">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>Partner</th> <th>Partner</th>
<th>Order ID</th> <th>Order ID</th>
<th>Amount</th> <th>Amount</th>
<th>Input Amount</th> <th>Input Amount</th>
<th>AUD Amount</th> <th>AUD Amount</th>
<th>Exchange Rate</th> <th>Exchange Rate</th>
<th>Status</th> <th>Status</th>
<th>Create Time</th> <th>Create Time</th>
<th>Gateway</th> <th>Gateway</th>
<th>Operation</th> <th>Operation</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}"> <tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}">
<td> <td>
<a role="button" ui-sref="partners.detail({clientMoniker:trade.client_moniker})"> <a role="button"
{{trade.short_name}}({{trade.client_moniker}}) ui-sref="partners.detail({clientMoniker:trade.client_moniker})">
</a> {{trade.short_name}}({{trade.client_moniker}})
</td> </a>
<td> </td>
<img src="/static/images/royalpay_sign_s.png" <td>
uib-tooltip="RoyalPay" ng-if="trade.source=='system'"/> <img src="/static/images/royalpay_sign_s.png" uib-tooltip="RoyalPay"
<img src="/static/images/yangmaimai_sign.png" ng-if="trade.source=='system'" />
uib-tooltip="RP跨境商城" ng-if="trade.source=='RP跨境商城'"/> <img src="/static/images/yangmaimai_sign.png" uib-tooltip="RP跨境商城"
<img src="/static/images/wechatpay_sign.png" ng-if="trade.source=='RP跨境商城'" />
uib-tooltip="WechatPay" ng-if="trade.channel=='Wechat'"/> <img src="/static/images/wechatpay_sign.png" uib-tooltip="WechatPay"
<img src="/static/images/wechatpay_sign.png" ng-if="trade.channel=='Wechat'" />
uib-tooltip="Znyoo" ng-if="trade.channel=='Znyoo'"/> <img src="/static/images/wechatpay_sign.png" uib-tooltip="Znyoo"
<img src="/static/images/bestpay_sign.png" ng-if="trade.channel=='Znyoo'" />
uib-tooltip="BestPay" ng-if="trade.channel=='Bestpay'"/> <img src="/static/images/bestpay_sign.png" uib-tooltip="BestPay"
<img src="/static/images/alipay_sign.png" ng-if="trade.channel=='Bestpay'" />
uib-tooltip="Alipay" ng-if="trade.channel=='Alipay'"/> <img src="/static/images/alipay_sign.png" uib-tooltip="Alipay"
<img src="/static/images/alipay_sign.png" ng-if="trade.channel=='Alipay'" />
uib-tooltip="AlipayOnline" ng-if="trade.channel=='AlipayOnline'"/> <img src="/static/images/alipay_sign.png" uib-tooltip="AlipayOnline"
<img src="/static/images/jd_sign.png" ng-if="trade.channel=='AlipayOnline'" />
uib-tooltip="JD Pay" ng-if="trade.channel=='jd'"/> <img src="/static/images/jd_sign.png" uib-tooltip="JD Pay"
<img src="/static/images/hf_sign.png" ng-if="trade.channel=='jd'" />
uib-tooltip="HF Pay" ng-if="trade.channel=='hf'"/> <img src="/static/images/hf_sign.png" uib-tooltip="HF Pay"
<img src="/static/images/rpayplus_sign.png" ng-if="trade.channel=='hf'" />
uib-tooltip="Royal Pay" ng-if="trade.channel=='Rpay'"/> <img src="/static/images/rpayplus_sign.png" uib-tooltip="Royal Pay"
<img src="/static/images/yeepay_sign.png" ng-if="trade.channel=='Rpay'" />
uib-tooltip="Yeepay" ng-if="trade.channel=='Yeepay'"/> <img src="/static/images/yeepay_sign.png" uib-tooltip="Yeepay"
<img src="/static/images/lakalapay_sign.png" ng-if="trade.channel=='Yeepay'" />
uib-tooltip="LakalaPay" ng-if="trade.channel=='LakalaPay'"/> <img src="/static/images/lakalapay_sign.png" uib-tooltip="LakalaPay"
<img src="/static/images/card_payment_sign.png" ng-if="trade.channel=='LakalaPay'" />
uib-tooltip="Card Payment" ng-if="trade.channel=='rpaypmt_card'"/> <img src="/static/images/card_payment_sign.png" uib-tooltip="Card Payment"
<img src="/static/images/direct_debit_sign.png" ng-if="trade.channel=='rpaypmt_card'" />
uib-tooltip="Direct Debit" ng-if="trade.channel=='rpaypmt_dd'"/> <img src="/static/images/direct_debit_sign.png" uib-tooltip="Direct Debit"
{{trade.order_id}}<span ng-if="trade.source!='system'&& trade.source!=null && trade.incremental_surcharge != null"><i class="fa fa-question-circle-o" uib-tooltip-html="trade.htmlTooltip"></i></span> ng-if="trade.channel=='rpaypmt_dd'" />
</td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<td> uib-tooltip="Alipay CN"
{{trade.total_amount|currency:trade.currency}} ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_cn'" />
<a ng-if="trade.refund_fee" class="text-danger" role="button"
ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a> <img src="/static/images/alipay_sign.png" style="height: 20px"
</td> uib-tooltip="Alipay SG"
<td ng-bind="trade.display_amount|currency:trade.currency"></td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_sg'" />
<td ng-bind="trade.clearing_amount|currency:'AUD'"></td>
<td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')" uib-tooltip="Alipay MO"
ng-bind="trade.exchange_rate"></span> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_mo'" />
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')"> - </span>
</td> <img src="/static/images/alipay-hk.png" style="height: 20px"
<td ng-bind="trade.status|tradeStatus"></td> uib-tooltip="Alipay HK/支付宝香港"
<td ng-bind="trade.create_time"></td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_hk'" />
<td ng-bind="trade.gateway|tradeGateway"></td>
<td> <img src="/static/images/alipay_sign.png" style="height: 20px"
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)" title="Detail"> uib-tooltip="Alipay LU"
<i class="fa fa-list-alt"></i> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_lu'" />
</a>
<a role="button" <img src="/static/images/alipay_sign.png" style="height: 20px"
ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && ('do_refund'|withFunc)" uib-tooltip="Alipay GB"
title="Refund" ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_gb'" />
class="text-bold text-danger" ng-click="newRefund(trade.order_id)">
<i class="fa fa-undo"></i> <img src="/static/images/alipay_sign.png" style="height: 20px"
</a> uib-tooltip="Alipay US"
</td> ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='alipay_ac_us'" />
</tr>
<img src="/static/images/paytm-logo.png" style="height: 20px"
uib-tooltip="Patytm Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='paytm'" />
<img src="/static/images/kakaopay.png" style="height: 20px"
uib-tooltip="Kakao Pay"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='kakaopay'" />
<img src="/static/images/truemoney-logo.png" style="height: 20px"
uib-tooltip="TrueMoney"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='truemoney'" />
<img src="/static/images/ezlink-logo.png" style="height: 20px"
uib-tooltip="EZLINK"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='ezlink'" />
<img src="/static/images/gcash-logo.png" style="height: 20px"
uib-tooltip="GCash"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='gcash'" />
<img src="/static/images/TNGeWalletLogo.png" style="height: 20px"
uib-tooltip="TNG"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='tng'" />
<img src="/static/images/dana-wallet-logo.png" style="height: 20px"
uib-tooltip="Dana Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='dana'" />
<img src="/static/images/easypasia-logo.png" style="height: 20px"
uib-tooltip="EasyPasia"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='easy_paisa'" />
<img src="/static/images/bkash-logo.png" style="height: 20px"
uib-tooltip="bKash Wallet"
ng-if="trade.channel=='AlipayPlus' && trade.pay_type=='bkash'" />
<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'" />
{{trade.order_id}}<span
ng-if="trade.source!='system'&& trade.source!=null && trade.incremental_surcharge != null"><i
class="fa fa-question-circle-o"
uib-tooltip-html="trade.htmlTooltip"></i></span>
</td>
<td>
{{trade.total_amount|currency:trade.currency}}
<a ng-if="trade.refund_fee" class="text-danger" role="button"
ng-click="showRefundLog(trade.order_id)">(-{{trade.refund_fee}})</a>
</td>
<td ng-bind="trade.display_amount|currency:trade.currency"></td>
<td ng-bind="trade.clearing_amount|currency:'AUD'"></td>
<td>
<span ng-if="(trade.channel!='hf') && (trade.channel!='Rpay')"
ng-bind="trade.exchange_rate"></span>
<span ng-if="(trade.channel=='hf') || (trade.channel=='Rpay')"> - </span>
</td>
<td ng-bind="trade.status|tradeStatus"></td>
<td ng-bind="trade.create_time"></td>
<td ng-bind="trade.gateway|tradeGateway"></td>
<td>
<a role="button" class="text-bold" ng-click="showTradeDetail(trade)"
title="Detail">
<i class="fa fa-list-alt"></i>
</a>
<a role="button"
ng-if="trade.status>=5 && trade.confirm_time!=null && trade.clearing_status<2 && ('do_refund'|withFunc)"
title="Refund" class="text-bold text-danger"
ng-click="newRefund(trade.order_id)">
<i class="fa fa-undo"></i>
</a>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-body" ng-if="tradeLogs.length"> <div class="box-body" ng-if="tradeLogs.length">
<uib-pagination class="pagination" <uib-pagination class="pagination" total-items="pagination.totalCount" boundary-links="true"
total-items="pagination.totalCount" ng-model="pagination.page" items-per-page="pagination.limit" max-size="10"
boundary-links="true" ng-change="loadTradeLogs()" previous-text="&lsaquo;" next-text="&rsaquo;"
ng-model="pagination.page" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
items-per-page="pagination.limit"
max-size="10"
ng-change="loadTradeLogs()"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row"> <div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total <div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
Pages:{{pagination.totalPages}} Pages:{{pagination.totalPages}}
@ -549,4 +621,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

@ -268,6 +268,10 @@ $(function () {
location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result'; location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return; return;
} }
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) { if (window.AlipayJSBridge) {
callPayment(); callPayment();
} else { } else {

@ -313,6 +313,10 @@ $(function () {
location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result'; location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return; return;
} }
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) { if (window.AlipayJSBridge) {
callPayment(); callPayment();
} else { } else {

@ -276,6 +276,10 @@ $(function () {
location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result'; location.href = '/api/v1.0/alipay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result';
return; return;
} }
if (pay.mweb_url){
location.href = pay.mweb_url;
return;
}
if (window.AlipayJSBridge) { if (window.AlipayJSBridge) {
callPayment(); callPayment();
} else { } else {

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

Loading…
Cancel
Save