创建订单报错
请求示例
// 构造一个 APIv3 客户端实例
$instance = Builder::factory([
'mchid' => $merchantId,
'serial' => $merchantCertificateSerial,
'privateKey' => $merchantPrivateKeyInstance,
'certs' => [
$platformCertificateSerial => $platformPublicKeyInstance,
],
]);
// 发送请求
$resp = $instance->chain('v3/certificates')->get(
['debug' => false] // 调试模式,https://docs.guzzlephp.org/en/stable/request-options.html#debug
);
报错信息
#线上(linux)正常,线下(windows)报错
curl_setopt_array(): cannot represent a stream of type Output as a STDIO FILE*
问题原因
windows 上,没有 stdout/stderr 文件句柄,请把 'debug' => true 拿掉试试
原文链接
https://developers.weixin.qq.com/community/develop/doc/0000281edd0a10b30bde2093451c00