// 从本地文件中加载「商户API私钥」,「商户API私钥」会用来生成请求的签名
$merchantPrivateKeyFilePath = 'file:///D:/wwwroot/cert/apiclient_key.pem';
商户私钥用这种目录形式不对吗?提示出错。
Fatal error: Uncaught UnexpectedValueException: Cannot load privateKey from(string), please take care about the \$thing input. in D:\wwwroot\zwd.wcmyks.com\cn_asp\wxPay\wechatpay\weChatPay\Crypto\Rsa.php:178 Stack trace #0 D:\wwwroot\zwd.wcmyks.com\cn_asp\wxPay\wechatpay\transfer.php(16): WeChatPay\Crypto\Rsa::from('file:///D:/wwwr...', 'private' #1 {main} thrown in D:\wwwroot\zwd.wcmyks.com\cn_asp\wxPay\wechatpay\weChatPay\Crypto\Rsa.php on line 178
无法载入私钥。
私钥文件目录没有错,可以在浏览器地址栏打开。
readme示例是linux的路径,所以你会看起来有三个“/”,你用win的时候这样就不对了
$merchantPrivateKeyFilePath = 'file:///D:/wwwroot/cert/apiclient_key.pem';
用 file://D:/ ,你多了一个斜杠。