PHP语言
1在确保微信公众平台里的微信支付---》开发配置--》支付授权目录填上你的网站地址
2在公众号设置--》功能设置---》js接口安全域名按要求填上域名如 www.qq.com
3确保你的微信AppId和AppSecret以及商户号和商户密匙正确,还要到商户平台下载证书
确保以上的正确之后:
我这原来是这个,相对路径curl_setopt($ch,CURLOPT_SSLCERT, './pay/apiclient_cert.pem');
后来改成这个,绝对路径curl_setopt($ch,CURLOPT_SSLCERT, 'D:\\pay\apiclient_cert.pem');
迁移项目之后,搜索一下整个项目apiclient_cert.pem和apiclient_key.pem这两个文件在哪里引入,然后将他们引入的地址修改成绝对路径就OK了