@ -2,24 +2,35 @@ 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.AlipayCommonApi ;
import au.com.royalpay.payment.channels.rpay.runtime.RpayApi ;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayOnlineApi ;
import au.com.royalpay.payment.channels.alipay.runtime.AlipayRetailApi ;
import au.com.royalpay.payment.channels.alipay.runtime.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.ChannelMerchantApplicationService ;
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.MchChannelContract ;
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.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 +85,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 ;
@ -115,6 +127,8 @@ import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.util.HSSFColor ;
import org.apache.poi.hssf.util.HSSFColor ;
import org.apache.poi.ss.usermodel.CellStyle ;
import org.apache.poi.ss.usermodel.CellStyle ;
import org.apache.poi.ss.usermodel.Font ;
import org.apache.poi.ss.usermodel.Font ;
import org.dom4j.DocumentException ;
import org.dom4j.DocumentHelper ;
import org.dom4j.Element ;
import org.dom4j.Element ;
import org.joda.time.DateTime ;
import org.joda.time.DateTime ;
import org.joda.time.format.DateTimeFormat ;
import org.joda.time.format.DateTimeFormat ;
@ -168,7 +182,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 +230,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 +256,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private ClientAuditProcessMapper clientAuditProcessMapper ;
private ClientAuditProcessMapper clientAuditProcessMapper ;
@Resource
@Resource
private SysWxMerchantApplyMapper sysW xMerchantApplyMapper;
private WxMerchantApplyMapper w xMerchantApplyMapper;
@Resource
@Resource
private SysRpayMerchantApplyMapper sysRpayMerchantApplyMapper ;
private SysRpayMerchantApplyMapper sysRpayMerchantApplyMapper ;
@Resource
@Resource
@ -279,8 +284,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 +329,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RPayMerchantMapper rPayMerchantMapper ;
private RPayMerchantMapper rPayMerchantMapper ;
@Resource
@Resource
private SysClientUpayProfileMapper sysClientUpayProfileMapper ;
private SysClientUpayProfileMapper sysClientUpayProfileMapper ;
@Resource
private PaymentApi paymentApi ;
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" ) ;
@ -876,6 +882,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
/ * *
/ * *
* 保 存 微 信 mccode
* 保 存 微 信 mccode
*
* @param partner
* @param partner
* /
* /
private void saveWechatMcc ( JSONObject partner ) {
private void saveWechatMcc ( JSONObject partner ) {
@ -1069,7 +1076,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,7 +1564,7 @@ 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 ) | | "CB_BankPay" . equalsIgnoreCase ( channel ) ) {
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
JSONObject client = getClientInfoByMoniker ( clientMoniker ) ;
if ( client = = null ) {
if ( client = = null ) {
@ -1564,8 +1572,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
clientModifySupport . processClientConfigModify ( new SwitchPermissionModify ( manager , clientMoniker , "enable_" + channel . toLowerCase ( ) , allow ) ) ;
clientModifySupport . processClientConfigModify ( new SwitchPermissionModify ( manager , clientMoniker , "enable_" + channel . toLowerCase ( ) , allow ) ) ;
logger . info ( manager . getString ( "display_name" ) + "(" + manager . getString ( "manager_id" ) + ") switched client " + clientMoniker + " channel "
logger . info ( "{}({}) switched client {} channel {} to {}" , manager . getString ( "display_name" ) , manager . getString ( "manager_id" ) , clientMoniker , channel , allow ) ;
+ channel + " to " + 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 +1893,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 +5213,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 payment Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
MpWechatApi wx Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
String templateId = payment Api. getTemplateId ( "new-apply" ) ;
String templateId = wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception ignore ) {
} catch ( Exception ignore ) {
}
}
}
}
@ -5241,9 +5248,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendToBDTemplate ( wxopenid , payment Api. getTemplateId ( "refuse-bd" ) , refuseRemark , client ) ;
TemplateMessage msg = initSendToBDTemplate ( wxopenid , wx Api. getTemplateId ( "refuse-bd" ) , refuseRemark , client ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception ignored ) {
} catch ( Exception ignored ) {
}
}
}
}
@ -5270,9 +5277,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendToBDAgreeFileTemplate ( wxopenid , payment Api. getTemplateId ( "new-apply" ) , remark , client ) ;
TemplateMessage msg = initSendToBDAgreeFileTemplate ( wxopenid , wx Api. getTemplateId ( "new-apply" ) , remark , client ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
}
}
}
}
@ -5298,15 +5305,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 payment Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
MpWechatApi wx Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
String templateId = payment Api. getTemplateId ( "new-apply" ) ;
String templateId = wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception ignore ) {
} catch ( Exception ignore ) {
}
}
}
}
@ -5331,15 +5338,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 payment Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
MpWechatApi wx Api = mpWechatApiProvider . getWechatApiForTemplateMessage ( wxopenid ) ;
String templateId = payment Api. getTemplateId ( "new-apply" ) ;
String templateId = wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception ignore ) {
} catch ( Exception ignore ) {
}
}
}
}
@ -5392,10 +5399,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5416,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , "BD申请制作合同" + client_moniker ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , "BD申请制作合同" + client_moniker ,
bd_user_name , "制作合同申请" , "BD申请制作" + short_name + "的合同" ) ;
bd_user_name , "制作合同申请" , "BD申请制作" + short_name + "的合同" ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5434,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , client_moniker + "合同制作完成" ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , client_moniker + "合同制作完成" ,
"Compliance" , "合规材料" , "上传完整合规材料,商户:" + short_name ) ;
"Compliance" , "合规材料" , "上传完整合规材料,商户:" + short_name ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5457,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , client_moniker + "合规材料已提交" ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , client_moniker + "合规材料已提交" ,
bd_user_name , "审核材料" , "已提交合规材料,等待审核" ) ;
bd_user_name , "审核材料" , "已提交合规材料,等待审核" ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5478,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5495,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , client_moniker + "申请绿色通道" ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , client_moniker + "申请绿色通道" ,
bd_user_name , "绿色通道申请" , "BD已提交绿色通道申请,商户:" + short_name ) ;
bd_user_name , "绿色通道申请" , "BD已提交绿色通道申请,商户:" + short_name ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5524,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , "BD申请制作信用卡支付合同" + client_moniker ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , "BD申请制作信用卡支付合同" + client_moniker ,
bd_user_name , "制作卡支付合同申请" , "BD申请制作" + short_name + "的卡支付合同" ) ;
bd_user_name , "制作卡支付合同申请" , "BD申请制作" + short_name + "的卡支付合同" ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5542,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , client_moniker + "信用卡支付合同制作完成" ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , client_moniker + "信用卡支付合同制作完成" ,
"Compliance" , "合规材料" , "上传完整合规材料,商户:" + short_name ) ;
"Compliance" , "合规材料" , "上传完整合规材料,商户:" + short_name ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5565,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , payment Api. getTemplateId ( "commission" ) , client_moniker + "信用卡卡支付合规材料已提交" ,
TemplateMessage msg = initSendCommissionTemplate ( wxopenid , wx Api. getTemplateId ( "commission" ) , client_moniker + "信用卡卡支付合规材料已提交" ,
bd_user_name , "审核材料" , "已提交合规材料,等待审核" ) ;
bd_user_name , "审核材料" , "已提交合规材料,等待审核" ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5586,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 payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. 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 +5600,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 = sysW xMerchantApplyMapper. listWxMerchantApplices ( client . getInteger ( "client_id" ) ,
List < WechatMerchantInfo> applices = w xMerchantApplyMapper. 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 +5639,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 +5648,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
@ -5689,30 +5678,20 @@ 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
* /
* /
@ -5722,15 +5701,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( client = = null ) {
if ( client = = null ) {
throw new BadRequestException ( "partner code is not exists!" ) ;
throw new BadRequestException ( "partner code is not exists!" ) ;
}
}
JSONObject subMerchantApplyInfo = sysW xMerchantApplyMapper. findByClientIdAndSubMerchantAppId ( client . getInteger ( "client_id" ) , merchantAppId ) ;
WechatMerchantInfo subMerchantApplyInfo = w xMerchantApplyMapper. 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
@ -5747,23 +5727,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject params = subMerchantIdApply . insertObject ( client ) ;
JSONObject params = subMerchantIdApply . insertObject ( client ) ;
params . put ( "merchant_app_id" , merchantAppId ) ;
params . put ( "merchant_app_id" , merchantAppId ) ;
SubMerchantInfoInheritance subMerchantInfo = JSON Object . 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
@ -5772,11 +5744,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
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 +5773,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 +5783,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException ( ) ;
throw new InvalidShortIdException ( ) ;
}
}
checkOrgPermission ( manager , client ) ;
checkOrgPermission ( manager , client ) ;
Alipay Config. AlipayMerchant mch = AlipayEnvironment . getEnv ( ) . getAlipayRetailMerchant ( ) ;
Alipay MerchantEntity alipayMch = merchantChannelApplicationManager . getRegister ( AlipayRetailApi . class ) . findMerchant ( client ) ;
Element resultElement = alipay Client. queryGmsPortalStatus ( mch . getPid ( ) , client ) ;
Element resultElement = alipay Mch. 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 +5803,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 +5839,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 +5889,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 +5924,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 +5953,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException ( "您已申请成功子商务号,请勿重复申请" ) ;
throw new BadRequestException ( "您已申请成功子商务号,请勿重复申请" ) ;
}
}
SubRpayMerchantInfo subRpayMerchantInfo = JSON Object . 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 +5982,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 +5990,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 . getBoolean Value ( "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't be where we are today. </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. </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. </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. </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't be where we are today. </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. </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. </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. </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 +6568,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} ) ;
} ) ;
needNotifyUsers . forEach ( userOpenId - > {
needNotifyUsers . forEach ( userOpenId - > {
try {
try {
MpWechatApi payment Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
MpWechatApi wx Api = mpWechatApiProvider . getNewPaymentApi ( ) ;
TemplateMessage msg = initSendTestPasswordTemplate ( userOpenId , payment Api. getTemplateId ( "test-merchant-password" ) ) ;
TemplateMessage msg = initSendTestPasswordTemplate ( userOpenId , wx Api. getTemplateId ( "test-merchant-password" ) ) ;
payment Api. sendTemplateMessage ( msg ) ;
wx Api. sendTemplateMessage ( msg ) ;
} catch ( Exception e ) {
} catch ( Exception e ) {
logger . error ( "给{}发送微信消息失败,原因:{}" , userOpenId , e ) ;
logger . error ( "给{}发送微信消息失败,原因:{}" , userOpenId , e ) ;
}
}