@ -4695,6 +4695,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if ( rate = = null ) {
throw new BadRequestException ( "The Partner's Rate is not config!" ) ;
}
checkChannelRate ( client , PayChannel . ALIPAY_APS_IN_STORE . getChannelCode ( ) ) ;
checkChannelRate ( client , PayChannel . ALIPAY_APS_CASHIER . getChannelCode ( ) ) ;
List < JSONObject > clientFiles = clientFilesMapper . findClientFile ( client . getIntValue ( "client_id" ) ) ;
if ( clientFiles = = null | | clientFiles . equals ( "" ) ) {
throw new BadRequestException ( "The Compliance File Must Be Uploaded!" ) ;
@ -4719,6 +4722,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendCommissionWechatMessage ( client ) ;
}
}
private void checkChannelRate ( JSONObject client , String channel ) {
MerchantChannelPermissionResolver resolver = this . paymentApi . channelApi ( channel ) . getChannelPermissionResolver ( ) ;
if ( ! Objects . isNull ( resolver ) & &
resolver . newOrderEnabled ( client , null , PlatformEnvironment . getEnv ( ) . getForeignCurrency ( ) )
) {
JSONObject rateApsInstore = merchantInfoProvider . clientCurrentRate ( client . getIntValue ( "client_id" ) , new Date ( ) , channel ) ;
if ( rateApsInstore = = null ) {
throw new BadRequestException ( "The Partner's " + channel + " Rate is not config!" ) ;
}
}
}
@Override
@Transactional
@ -7342,14 +7356,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
//装在数据
JSONObject info = new JSONObject ( ) ;
info . put ( "down_date" , formatter . print ( new DateTime ( ) ) ) ; //下载文件日期
info . put ( "bussiness_name" , ( client . containsKey ( " business_name") ? client . getString ( "business _name") : legalInfo . getString ( "representative_person" ) ) + " " + client . getString ( "abn" ) ) ; //商圈类型
info . put ( "bussiness_name" , ( client . containsKey ( " company_name") ? client . getString ( "company _name") : legalInfo . getString ( "representative_person" ) ) + " " + client . getString ( "abn" ) ) ; //商圈类型
info . put ( "partner_address" , client . getString ( "address" ) ) ; //商家店铺地址
info . put ( "partner_country" , client . getString ( "country" ) ) ; //国家
info . put ( "partner_state" , client . getString ( "state" ) ) ; //洲
info . put ( "partner_bussiness_name" , client . getString ( "business_name" ) ) ; //商户商用名称
info . put ( "clean_days" , clientRate . getInteger ( "clean_days" ) ) ; //T+规则清算天数
info . put ( "partner_industry_mcc" , upayProfileInfo . getString ( "mw_industry" ) ) ; //信用卡注册商户行业编码
info . put ( "legal_bussiness" , legalInfo. getString ( "representative_person ") + " AS " + ( client . containsKey ( "business_name" ) ? client . getString ( "business_name" ) : legalInfo . getString ( "representative_person" ) ) + " ABN " + client . getString ( "abn" ) ) ; //拼接规则:法人名 AS 商用名称 ABD 编码
info . put ( "legal_bussiness" , client. getString ( "company_name ") + " AS " + ( client . containsKey ( "business_name" ) ? client . getString ( "business_name" ) : legalInfo . getString ( "representative_person" ) ) + " ABN " + client . getString ( "abn" ) ) ; //拼接规则:法人名 AS 商用名称 ABD 编码
info . put ( "annual_rate" , cardAnnualRate ) ; //年费率
info . put ( "cost_per_transaction" , clientRate . getString ( "transaction_fee" ) ) ; //每次交易成本
String domesticRateValue = cardRate . getString ( "domestic_rate_value" ) ;