- 小微商户,特约商户,怎么都是这个地址-这个地址到底是那个用的?
[图片] https://api.mch.weixin.qq.com/v3/applyment4sub/applyment/ [图片] 这个是怎么回事 那位大佬了解
2020-05-04 - 小微商户开通直报错 400 Bad Request? 附代码求大神帮忙解答下
public static void main(String[] args) throws CertificateException, IOException { X509Certificate mch_cert_pem = mchPublicKey.getX509(); //获取公钥 PrivateKey mch_key_pem_privateKey = provateKey.getProjectKey(); //获取私钥 String toJson = jsonString.getJsonString(mch_cert_pem); //获取json字符串并对铭感信息加密 WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, new PrivateKeySigner(mch_cert_pem.getSerialNumber().toString(16), mch_key_pem_privateKey)); HttpPost request = new HttpPost(url); request.setEntity(new StringEntity(toJson,ContentType.APPLICATION_JSON)); request.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType()+"; charset="+ContentType.APPLICATION_JSON.getCharset().name()); request.addHeader(HttpHeaders.USER_AGENT, "wxpay sdk java v1.0 " + mchId); request.addHeader(HttpHeaders.ACCEPT,ContentType.APPLICATION_JSON.getMimeType() ); request.addHeader("Wechatpay-Serial", "************************************"); request.setHeader(HttpHeaders.AUTHORIZATION,wechatPay2Credentials.getSchema()+" "+wechatPay2Credentials.getToken(request)); 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()); System.out.println(s); {"addition_info":"{}","business_info":"{\"merchant_shortname\":\"张三餐饮店\",\"service_phone\":\"03353553535\"}","subject_info":"{\"subject_type\":\"SUBJECT_TYPE_MICRO\",\"micro_biz_info\":\"{\\\"micro_biz_type\\\":\\\"MICRO_TYPE_STORE\\\",\\\"micro_store_info\\\":{\\\"store_entrance_pic\\\":\\\"JO1BP_PB5Qbz7sXpWi6IqwaTeU5ybQAcZDFbeP2nUBkFivABMAFRfyXXFQh2vHbTvSMiTlZeeG7XaZgqF0T2l-S27r04M-5h_uclB6p7zcg\\\",\\\"micro_address\\\":\\\"秦皇岛海港区迎宾路111号\\\",\\\"micro_indoor_copy\\\":\\\"JO1BP_PB5Qbz7sXpWi6Iq7OSWCklp0FWr8ppdFgssGvbgvxfMohCIvtB1gFt3BUC-JnNZpePNrvG3U43DqwlSVmQGM8q2EQYDaCDfLEfA2U\\\",\\\"micro_address_code\\\":\\\"130302\\\",\\\"micro_name\\\":\\\"大郎烧饼\\\"}}\",\"identity_info\":\"{\\\"id_doc_type\\\":\\\"IDENTIFICATION_TYPE_IDCARD\\\",\\\"id_card_info\\\":{\\\"id_card_copy\\\":\\\"JO1BP_PB5Qbz7sXpWi6Iq3xUidpKg4sz-DyuNenBjYWqVUNRFDXTkOS7hMSN7gj6JjY5D4xS1bHuzHflCPgWEjdylN1mGwiRh71qP_9fRyA\\\",\\\"card_period_end\\\":\\\"2035-09-07\\\",\\\"card_period_begin\\\":\\\"2015-09-07\\\",\\\"id_card_name\\\":\\\"SHyPVaDYtDwrQdQBiyDTghb8VrtfOsnBME9bFJMimdmFGUclMBCLCyOFcXUEiwymU3vQKzGjbocMGyCqSHLZYoWviaP8Y01eBQZ3KBMo+zHmbV0GyKbJAmOD73ePv6Oe/JsYz37Qn9h40uBEiRmksWFwS05R7V84JBE2mbn2DkAEo3j6/pT8lUi4v9PPEA/HOvQOGGg+Lt8tykVulgCWsl59ooFUKbhPw7TAle0sUeUquWHZGYrRnzraK9VNNJwCTIslUvZfOOzZ5Us2iLvUj27WVGVr2hJvhgS6Magu+BkX59M1xjDXGJEZKx8UolBqtEodLXzmHwZFzFq0k6Bsnw==\\\",\\\"id_card_national\\\":\\\"JO1BP_PB5Qbz7sX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qrHDvDM80U6LjMFOVAFbzMIGSWPbwQEHICKy333dqcBTBqaW+Us/EJZk+4DHXmu4tiWgBAwOb6DGxWrzllfk4yIg/6jmTc0gz3bmroC2BFB+vYRsMW8Wdt2tDOkNj8hrb7vyg==\",\"contact_id_number\":\"kZ0ZI93MpawZykoLzNbifVPwglc5DdFf9nY0vgR6lJwglfV/ez6g/EzwaGczOwKYwPDoPe43R099dC/ZD91HaA5s2nnzqhnpLD99ob+9XisNxhcds4X7HS8i6VlK5YRuJJpccp5/0v1uNMrIzvMnyCQKoy1gLRm/zNVy4Eh2yYzcC1s4y6cn2ptudzentEN+WRHEXhZNU2Hfurv6K/yKInyV1h1OhU2qbJAgRQL49GmV7Z1w4ehC2YU0ChLFJCmG9WPd4MoWRjJrA4kRs57+1395EOQPio+ezulGVX+e9NRuNvEGl0CKL+yMIlQa6iMjDvswXmNzONgYM5XARhFwBA==\",\"contact_email\":\"n7BlkuhVWFD785xSH5CSMgSTOlnDulpexflim+DK9IK850T7Ni1DrbvvdVoXjTCMFVAy3tUONZl3S/h6VDFOcbnc4xk/XVIVcOVlf/vaw96vmVs9OBTO+a+5LAZHSZZ/c7RGUpHoRa9CMdr9S4WrDy6TG2IuAjYIKWwgcXHK20ru8Hn4guTKhZB5/VWGb0AuZEjkVMUWWK9fehyfc44ovULg3NVpROzpZsmCrlIlboZwcoy+ZFtb3l5ExlcaR4Kv4dYngjpmr5ip2xjYofmrWL5YtwNY6OcNeFLgFWx3s6UkZreb9XXK6JPub53vBG/eWBLsRoQ0TkxK1GEQGArj8w==\"}","bank_account_info":"{\"account_number\":\"B7ovqiwXoW6pgUayf+bXe/nyV0Sj2T3ZxE5aXy+KddNd81oaguumKjF8kfZ+P29GOEZzQ1K8HiSH7J2P/XcyqkWuA4uLCZDqbsdF/VhM9RB/lsMmXFEy72MSugC2/uxyoa7zD23NwITurZwAJ/6PcPrp91gZM2yLv8Xc4GtYnmfW08bBVRY3/zDp3IvScIv9xcYIsm3h9oordmMMsrXurPph0tuAhazRhOz8hkvUjh8zBqTr5/ERNsR/Vndbd9ZxDraoJ29X5N7FiQoJMZ84VWBxgpipvW3TEw2R2l/r8WVOmWp6AKWfXpW9hO7PhFTjvTM41eX8hm8OS85LH9uwzA==\",\"bank_address_code\":\"130302\",\"account_name\":\"Kc8Q9qGg4fTDNkSsIBEFSangd/pLIH3vvz64BArX88AzlP9mJIrTp/Hyh9zkOc0x2hOY2+77wrtKVgcyMWNLBugH10OQAHeizNstWI8uxk3iKADurNzVMDWIPqJctaGdkBXevf/fcsQaA1IMVPETkObdR83qX7b+tlr/E1nxowR7wpcwKKqqhJCWqqcwNEw4IG3jW1W/ozlp63V2+SVb7zmQeWAW2tylNmj6cB4lm7XVUVfip90MWKPdDhFvG0LmqO58/tskmhG5lkvuU3/ESq6z5sH12t4y2bHZhPLtUsmIGxCq8jovKpZcs6i9dQsVq5KHEsITTxe3iStUFw7IBA==\",\"bank_name\":\"农业银行秦皇岛支行\",\"bank_account_type\":\"BANK_ACCOUNT_TYPE_CORPORATE\",\"account_bank\":\"农业银行\"}","settlement_info":"{\"settlement_id\":\"703\",\"qualification_type\":\"餐饮\"}"} 请求的json字符串 <html> <head><title>400 Bad Request</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> <hr><center>nginx</center> </body> </html> 报错信息 哪位大神帮忙解答下 谢谢了
2020-04-30