已解决,不懂问我
服务商小微支付有问题,<![CDATA[解密敏感信息失败,请检查后再试]]>?1:获取 https://api.mch.weixin.qq.com/risk/getcertficates获取到了 serial_no 和pem与解密后是一本证书 -----BEGIN CERTIFICATE----- MIID3DCCAsSgAwIBAgIUZPK3dQ2TBNA/Doe4YwWiLDDt+DowDQYJKoZIhvcNAQEL BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsTFFRlbnBheS5jb20gQ0Eg**************************************** 2开始对 要解密的内容加密 $data['id_card_name']=$this->controllerUnit->getEncrypt($data_micro['really_name']); $data['id_card_number']=$this->controllerUnit->getEncrypt($data_micro['identity_id']); $data['account_name']=$this->controllerUnit->getEncrypt($data_micro['bank_card_name']); $data['account_number']=$this->controllerUnit->getEncrypt($data_micro['bank_card_id']); $data['contact']=$this->controllerUnit->getEncrypt($data_micro['contract_name']); $data['contact_phone']=$this->controllerUnit->getEncrypt($data_micro['contract_phone']); $data['contact_email']=$this->controllerUnit->getEncrypt($data_micro['contract_email']); 2.1其中 getEncrypt() 方法如下 public function getEncrypt($str){ $encrypted = ''; openssl_public_encrypt($str,$encrypted,$this->getcertficates); //base64编码 $sign = base64_encode($encrypted); return $sign; } $this->getcertficates 就是 上面第一步解密后的证书 与解密后是一本证书 -----BEGIN CERTIFICATE----- MIID3DCCAsSgAwIBAgIUZPK3dQ2TBNA/Doe4YwWiLDDt+DowDQYJKoZIhvcNAQEL BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBA 3:发送post返回 <xml><return_code><![CDATA[FAIL]]></return_code> <return_msg><![CDATA[解密敏感信息失败,请检查后再试]]></return_msg> </xml>
2019-09-14我也遇到了这个问题 ,要怎么搞
小微商户进件-申请入驻接口 解密敏感信息失败按照要求,要加密的字段,全部都加了密的 (id_card_name,id_card_number,account_name,account_number,contact,contact_phone) email没有传,加密的证书用的是getcertficates接口获取后,解密得到的,提交入驻接口提示 解密敏感信息失败,请检查后再试
2019-09-14