const pay = new WxPay({
appid: 'wx4*******70fe16d8',
mchid: '16******16',
publicKey: fs.readFileSync(path.resolve(__dirname,"./pubkey.pem"),"utf8"), // 公钥
// publicKey: fs.readFileSync('./pubkey.pem'), // 公钥
privateKey: fs.readFileSync(path.resolve(__dirname,"./prikey.pem"),"utf8"), // 秘钥
// privateKey: fs.readFileSync('./prikey.pem'), // 秘钥
});
使用了wechatpay-node-V3 sdk,导入证书出现失败,请问是证书类型错误吗?
证书类型错误,导出的CA国际证书不对,应该是包含3个文件的证书apiclient_cert.p12,apiclient_cert.pem,apiclient_key