总是报以下错:
Fatal error: in /www/qdpay/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 113
以下是代码
<?php
require_once('../vendor/autoload.php');
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://httpbin.org',
'timeout' => 2.0,
]);
$url = 'https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi';
$arr = ['json' => [
"time_expire" => $time_expire,
"amount" => [
"total" => 1,
"currency" => "CNY",
],
"mchid" => "1582664661",
"description" => "7dpay test",
"notify_url" => "https://qdpay.gxczxx.com/qiduopay/pay_back.php",
"payer" => [
"openid" => "owNrd4tKptbKTYU8k9fTycaciVL4",
],
"out_trade_no" => "0000001",
"goods_tag" => "WXG",
"appid" => "wxe1b79231dce61413",
"attach" => "hello",
"scene_info" => []
],
'headers' => [ 'Accept' => 'application/json' ]
];
$response = $client->request('POST', $url, $arr);
print_r($response);
?>