特约商家进件请求接口:
https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/
请求返回报错信息:
结算银行账户开户名称(bank_account_info/account_name)有误:选择“对公银行账户”时,开户名称必须与营业执照或登记证书上的“商户名称”一致
请求参数:
{
"bank_account_info":{
"account_bank":"工商银行",
"account_name":"RS810QLX3n6JDD8xrQgWkJy6+A949YguuwE0ICUGrgSOBdLrZYr/zl/6RwaSQjEM45ThkpXgST7ZZLFZ9oDNUIwN441Zf6qSnAHkLsTibxWQ507gwLVvyBhNzAOKuuJTQoN28lWKF2UpYAGX6VQkcKwSoXDEVybZtsSkHz3VbGHy0LeB7THGPLOf1o95S2yJPyBSBePhA8nmVUCXbJ4725Bu/AoIMe3NooQPhXTOUz84SpZTW7yI1Hf/nkhV14IKTtbl1waefIwm2W1jXjqDjxcBgYPCt5PKh7lKSJJ9C/GWy3YlfXzxYVJfJl2sjzZjW1lUi9ElNmxa44IRVe3O/w==",
"account_number":"*****",
"bank_account_type":"BANK_ACCOUNT_TYPE_CORPORATE",
"bank_address_code":"440106",
"bank_name":"*******"
},
"business_code":"AM_20210715224611348608",
…………
"subject_info":{
"business_license_info":{
"legal_person":"",
"license_copy":"-0s1kIcDrBgDHiQotk7mceD-f-UW1ClqW-GJOvSF3pUR8RAMUnahVvuExAw_h09YFI",
"license_number":"",
"merchant_name":"广州*****有限公司"
},
……
"subject_type":"SUBJECT_TYPE_ENTERPRISE"
}
}
java环境,按demo写的代码,比对了几遍字段没有发现错误,商户名称和结算银行账户开户名称也是一样的,能帮忙看看是哪里的问题吗
遇到相同的问题,请问解决了吗
bank_account_info/account_name 要用平台证书进行加密,你用的是不是商户证书加的密?
public String encrypt(String str) {
X509Certificate wechatpayCertificate = verifier.getValidCertificate();
try {
return RsaCryptoUtil.encryptOAEP(str, wechatpayCertificate);
} catch (IllegalBlockSizeException e) {
}
verifier是AutoUpdateCertificatesVerifier:
verifier = new AutoUpdateCertificatesVerifier(
new WechatPay2Credentials(mchId,
new PrivateKeySigner(mchSerialNum, merPrivateKey)), apiv3Key.getBytes(DEFAULT_CHARSET));
}
StringEntity entity = new StringEntity(params);
entity.setContentType("application/json;charset=utf-8");
httpPost.setEntity(entity);
httpPost.setHeader("Accept", "application/json");
httpPost.setHeader("Wechatpay-Serial", wechatPaySerial);