收藏
回答

v3特约商户进件接口 提示400 Bad Request

描述:服务商商户证书确认有效,已在图片上传接口验证,但当调用进件接口时提示 400 Bad Request ,没有具体参数提示

请求URL:https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/

业务申请编号:2000004344_000012000004344_1579079712

响应结果:

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>

请求代码:

Map<String,Object> applymentObj = new HashMap<String,Object>();
applymentObj.put("business_code",business_code);
applymentObj.put("contact_info",contact_info);
applymentObj.put("subject_info",subject_info);
applymentObj.put("business_info",business_info);
applymentObj.put("settlement_info",settlement_info);
applymentObj.put("bank_account_info",bank_account_info);
applymentObj.put("addition_info",addition_info);
String toJson = gson.toJson(applymentObj);
WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, new PrivateKeySigner(mch_cert_pem.getSerialNumber().toString(16), mch_key_pem_privateKey));
HttpPost request = new HttpPost(url);
request.setHeader(HttpHeaders.CONTENT_TYPE,ContentType.APPLICATION_JSON.getMimeType()+"; charset="+ContentType.APPLICATION_JSON.getCharset().name());
request.setHeader(HttpHeaders.AUTHORIZATION,wechatPay2Credentials.getSchema()+" "+wechatPay2Credentials.getToken(request,toJson));
request.addHeader(HttpHeaders.USER_AGENT, "wxpay sdk java v1.0 " + mchId);
request.addHeader(HttpHeaders.ACCEPT,ContentType.APPLICATION_JSON.getMimeType() );
request.setEntity(new StringEntity(toJson,ContentType.APPLICATION_JSON));
WechatPayHttpClientBuilder httpClientBuilder = WechatPayHttpClientBuilder.create() ;
httpClientBuilder.withCredentials(wechatPay2Credentials);
List<X509Certificate> list = new ArrayList<X509Certificate>(1);
list.add(mch_cert_pem);
httpClientBuilder.withValidator(new WechatPay2Validator(new CertificatesVerifier(list)));
CloseableHttpClient httpClient = httpClientBuilder.build();
CloseableHttpResponse response = httpClient.execute(request);
HttpEntity httpEntity = response.getEntity();
String s = EntityUtils.toString(httpEntity, Consts.UTF_8.name());

请求头部信息:

请求主体:

{
    "addition_info":{
        "legal_person_commitment":"",
        "legal_person_video":"",
        "business_addition_pics":[
            "sk8w_vNYwhw1FqEPqK1gW8GnurbAGWa7ktLKOEjL7pBEksjwK3XsNypnlh5QD8_RYLTd5oarRMVNAHnU-zjTsnlcXBccpDMrwbcJ2lywCE8"
        ],
        "business_addition_msg":""
    },
    "business_info":{
        "merchant_shortname":"新物美超市",
        "service_phone":"15002616788",
        "sales_info":{
            "sales_scenes_type":[
                "SALES_SCENES_STORE"
            ],
            "biz_store_info":{
                "biz_store_name":"新物美超市",
                "biz_address_code":"131026",
                "biz_store_address":"大柳河镇",
                "store_entrance_pic":[
                    "sk8w_vNYwhw1FqEPqK1gW9Z_jmUUZBl5KPtoGfQN7Xn02rpyuXXdJghPsEJ5lmlHSAYdoOGH4Xbf3x7wQql8xKmxU5dDZNx0ll6M0OcK8nc"
                ],
                "indoor_pic":[
                    "sk8w_vNYwhw1FqEPqK1gW5vYJgC0QnSlY0NZ7D9_RPcCTnZV5X5DjV5OIkbrIKPLNQRPoAINflodTMCRZTEUveoEmCyPrk4Mu5oArrNH-k0"
                ]
            },
            "mp_info":{
                "mp_appid":"",
                "mp_sub_appid":"",
                "mp_pics":[

                ]
            },
            "mini_program_info":{
                "mini_program_appid":"",
                "mini_program_sub_appid":"",
                "mini_program_pics":[

                ]
            },
            "app_info":{
                "app_appid":"",
                "app_sub_appid":"",
                "app_pics":[

                ]
            },
            "web_info":{
                "domain":"",
                "web_authorisation":"",
                "web_appid":""
            },
            "wework_info":{
                "sub_corp_id":"",
                "wework_pics":[

                ]
            }
        }
    },
    "subject_info":{
        "subject_type":"SUBJECT_TYPE_INDIVIDUAL",
        "business_license_info":{
            "license_copy":"sk8w_vNYwhw1FqEPqK1gWwm7f85qXMHiSWHKkdSEkIp_5D3zYGv_ZTlNHPdc3GsQ66tq9-h2lZno_eAiGEf5LRjanbfvEb_nnnh0PTfqKOA",
            "license_number":"123456789",
            "merchant_name":"新物美超市",
            "legal_person":"周增飞"
        },
        "certificate_info":{
            "cert_copy":"",
            "cert_type":"",
            "cert_number":"",
            "merchant_name":"",
            "company_address":"",
            "legal_person":"",
            "period_begin":"",
            "period_end":""
        },
        "organization_info":{
            "organization_copy":"",
            "organization_code":"",
            "org_period_begin":"",
            "org_period_end":""
        },
        "ubo_info":{
            "id_type":"",
            "id_card_copy":"",
            "id_card_national":"",
            "id_doc_copy":"",
            "name":"",
            "id_number":"",
            "id_period_begin":"",
            "id_period_end":""
        },
        "identity_info":{
            "id_doc_type":"IDENTIFICATION_TYPE_IDCARD",
            "id_card_info":{
                "id_card_copy":"sk8w_vNYwhw1FqEPqK1gW4TBjJV3syQcx4Fg9h6DA57ZelOfEGVmJGBLzoQIOscqaF_MCVIN8xr_VHnm6Om9mSG_E7EpgJyRHaOrkM6wUww",
                "id_card_national":"sk8w_vNYwhw1FqEPqK1gW2vWXSNI5Huhe2X0WO7og-H0KCG1g8lEPISuezzFdaz82scUnb8LoW9gt-U1PsiEYRy5zbcMO7-josj0_9x-Jzs",
                "id_card_name":"bL2YFc9/wVx8lUb3eY7OcJ2Hy5Fe69FOJ3AC9Nzr0LyAX9AxVRjVIiEE/SQX2qMBy8XdDHJWrUNLJwIgUejBzCUCJiqGUbOya6UGcuBg77UoI48ajJlbqfmZiu43QIeU7yOvE2xRM+wCREzLg8dHbNKeHKTj+bPGDOyerDbl++R3g/ZaRyT+ScDvb91a6dijnWvcy57k23xoLwbZUkzgVhGJp+37tS5qCdbmkCw3VrnG3TJUY2JewOLkETOY1zDyL9yR/NVDyU85Ts2atweXCYUXUCznLn5KR+Q3Ni8mrSKu/hqV2fGjDl/ny+Sa7y+x9xtqBb3botP8FxBejbcPyw==",
                "id_card_number":"OGDbC8qaKZI0tZq4SLWEBYReeJ2eMySq5cZFmRKG4hXHbuZFgaC3szPVAC/IrJk6/Zz5I58Ly5ShLP9m1gqFwZMNUfRhTR6F3ZzhCQ6WhL+1cMqQ27V2dYo0DHvcWY3Gpm3N8Fq/f+zUgUhvU08pjNBToE4nlscu0+hkvAC4cz9GsGRqs2dR2YxoQQxJ+LpSZrNZFIKpdnJVagBOEuBPxa3fpW8Znv/l/RXhOkOBzsaJtX817BqYoA+VCMRJ+9LLlm1RXKj175Iz4eAKT3L50+uszERyfztMVvFEWJxSeXIvXeFbL1CQCCNx/b+MFOfiTLj5cNl6802Ex5r+UdxOVg==",
                "card_period_begin":"2016-06-06",
                "card_period_end":"2036-06-06"
            },
            "id_doc_info":{
                "id_doc_copy":"",
                "id_doc_name":"",
                "id_doc_number":"",
                "doc_period_begin":"",
                "doc_period_end":""
            },
            "owner":"true"
        }
    },
    "business_code":"2000004344_000012000004344_1579079712",
    "contact_info":{
        "contact_name":"deyvI0hCL2sFIXZHplryJBv4Q3BBejUdB9V7EihYS3yrik8z3nO5n6XUnTBXioeTxcz9L1XXJf2F5vDBboppQMTQMv2B89gDYXUMon3/dB0Xsvv/MGg8SBvbmcG0ypCRdo5tInVQOty5WZDMWQBTClNMalq9V7FVgruVj93qoQdIg+m/Ny9sTLYLIQQxOAf3lDgTWNIwEqvbIINrxh5Ld7qZtnBGJ7uECLbqtHelSaF1mGN2QKKy4Xmnp6xyPHjPuBsMKk82j84NvnrT+nBiDKDRrxSowiU8jLxVjjeNPfwX8MIu6XV/H5pGPUAzmfL2MznxELhD2zl8AfMqH2nHQg==",
        "contact_id_number":"qu78gxOQS0c5h1yhKOuBDtaffKwY5eQ5vnPEHRRy/oarxDMnR3iZ8hiREZP52yaFEUzmKWLFf8ZXreS57/4NI3WVKLaUyjhCsaH1kZH828Ha//fh4nyiRfWuE6aTeh2SbI5yu7460NahtIFNVKWTmGACXvqQOJu0ZsXd0l/Pu32CwyBP0XAPxgulvKFF/qfUZIrwJ4Emi1e3o5+wwvSd7wSLIsKyuBZdZJNvxmT7nM9DJ52VuU52hfWQeHYrpD4FFFpGGz5QAXimmMXh2iH+US33Q50LihdIZMxNWjUsrL05ndXAyt1Aio5e/pM9nEDEYOVCFOVCZ5+sMKSgOOnLxg==",
        "openid":"",
        "mobile_phone":"ykrx8JRuCxlHJxVu0jpkFMay7jGdzbbEQypb4C1F1wsGxo66w0OIJhx9Aek5Gzl40diZygcaBDpFRhdWfMqjAQcweJQ08y6SVCmvbVIjsmnjBk0G49jFYMoTayEcmm1Y3MvFqwTZqxSsafwIQjn8QzGJUbCSiTZGXb9j2JHwacG55x6ZZf/G+xsrvzuSU5gVuF83PuV/H/+vehArKmuwVeC2kWWd9VGYTluKkOrMBt5+OEZ8Zd2gN+qaCz7jjaqTlURF3kLuwP9Z4+Wq6SH1eVKFtI3BUsCK7ensBguOsbc9SbT+KxeWIRkFaKhTRM9iLUKQRuo2+EzBfKVeTltXIQ==",
        "contact_email":"w3+8Ky1ANrIu91ss+cOjs1JLPL+UxyTxT2tKzpKSEt8T2Ondul91IJHruWpD0gXJ3GmlXTNQ/Tgd4+W5ztzvDwDNxkCU9KnsFSyUV4r4sUG7Uh8K3KYcv0Anlg8dwUPZCDkiydm2oUBTfG0ETi4cY3OIEuRLrtSWGOncNmY0zII6D9wRsVVIdXSxrbIXoznS7IxhpoEJ3+z5t/U5kvhmHfK/toU0dpUoNfDJU942wdb/rbIbijOSfmv4c42nYqSJpfBnAt3XNGlTam2OY6yIYtYH6fNporFvxmOl9CVHuiJ2OOo2HN58o8tsaYqOC/fjoKNgn9yK4iDq8KQO2WTQPg=="
    },
    "bank_account_info":{
        "bank_account_type":"BANK_ACCOUNT_TYPE_PERSONAL",
        "account_name":"mfPky5ay5pGxJSWAaMEuXYNKJ7ei1/HzD4CTiBunRB1a36n2P7utVlxgU9mBiYMFUxWeVNHbpoiLBNOUycO147nQVWcclnTcBOzwUcXq27nKehMmwx1E2bfc9RJxcN4rnTuTLyQ0hIv7/tV75NOTPlVGufej9CR2QgMcP3tCNQqFZ/XbhkkShfA91d7WixjLsjpo4wBoumpDLXOA5c9B2w362jLrIsWcywoAu2LDHVbBsm+vX5QXFVkjv0Lp1irl4nF1yRqOHBloAUWPlaKM8jdb/xJngGuO//UBzkVeH5hoekmN568QHlMCxKaebxOB0qTZpVlBQu4ikUukONhWtA==",
        "account_bank":"建设银行",
        "bank_address_code":"620102",
        "bank_branch_id":"",
        "bank_name":"中国建设银行股份有限公司兰州城关支行",
        "account_number":"1Pyb0NX6ffOKUBE2Shy7S/QAuGhlFb7n9fmuw+oRC8D7yudpxYePAZDjUmMaSGbwtfC0Xgs1pvmAN9asEeKJFPJBJ/S1o4UjMfyKuylKEf+IxSttAB4bY+VRPRrsVypYfR4ZwIKJ+JBFGb68CjWGaba+C7KFfxsf7JFqUoFJSH1wYSFN/6MtfWMYKbYB+gbBFOW292SkP2qhodc2kEY2DCHgBLXHaSrT1xT2j16mTfEauMQdROJEay1iukXmxsFnpojEyROuqu6u/Hy/heS/bgwMSpK6sePt+NY8HfxM+qtquV1GfJPdGYDLAl1Lw3GdX9DUEJBT72hkNCQLCl3pIA=="
    },
    "settlement_info":{
        "settlement_id":"719",
        "qualification_type":"餐饮",
        "qualifications":[

        ],
        "activities_id":"",
        "activities_rate":"0.0038",
        "activities_additions":[

        ]
    }
}




回答关注问题邀请回答
收藏

3 个回答

  • 托雷妞
    托雷妞
    2020-03-05

    请问楼主后来解决了吗?我也遇到同样问题

    2020-03-05
    有用
    回复 1
    • snowRiver
      snowRiver
      2020-04-08
      解决了啊,我是头部添加Wechatpay-Serial 平台证书序列号,并使用平台证书加密敏感数据解决
      2020-04-08
      回复
  • snowRiver
    snowRiver
    2020-02-25

    头部添加Wechatpay-Serial 平台证书序列号,并使用平台证书加密敏感数据解决

    2020-02-25
    有用
    回复
  • 微信支付技术助手8
    微信支付技术助手8
    2020-02-17

    你好,你这是几号的单?建议你添加一下WePayTS8(备注:微信社区XXX问题)

    2020-02-17
    有用
    回复 2
    • snowRiver
      snowRiver
      2020-02-17
      2020年02月16日的单
      2020-02-17
      回复
    • snowRiver
      snowRiver
      2020-02-20
      加了3天的微信,加不了,问题一直没解决的了
      2020-02-20
      回复
登录 后发表内容
问题标签