当我尝试创建发票时出现上述错误。发票创建成功,但上述错误没有发生。
我发现了这个,但它不起作用 -方法声明应该与 PHP 中的父方法兼容 这是函数-
class PayPal
{
.
.
.
/**
* Send the API request to PayPal using CURL
*
* @access public
* @param string NVP string
* @return string
*/
function CURLRequest($Request)
{
$curl = curl_init();
// curl_setopt($curl, CURLOPT_HEADER,TRUE);
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_URL, $this->EndPointURL);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $Request);
if($this->APIMode == 'Certificate')
{
curl_setopt($curl, CURLOPT_SSLCERT, $this->PathToCertKeyPEM);
}
$Response = curl_exec($curl);
curl_close($curl);
return $Response;
}
.
.
}
class PayPal_Adaptive extends PayPal
{
.
.
.
/**
* Send the API request to PayPal using CURL
*
* @access public
* @param string $Request
* @param string $APIName
* @param string $APIOperation
* @return string
*/
function CURLRequest($Request, $APIName, $APIOperation)
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_URL, $this -> EndPointURL . $APIName . '/' . $APIOperation);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $Request);
curl_setopt($curl, CURLOPT_HTTPHEADER, $this -> BuildHeaders(false));
if($this -> APIMode == 'Certificate')
{
curl_setopt($curl, CURLOPT_SSLCERT, $this -> PathToCertKeyPEM);
}
$Response = curl_exec($curl);
curl_close($curl);
return $Response;
}
.
.
} // End Class PayPal_Adaptive
我已将所有参数更改为相同的数字以及相同的默认值,但似乎不起作用。系统正在使用自定义错误处理程序。我也试过这个 -error_reporting(E_ALL & ~(E_NOTICE | E_DEPRECATED | E_STRICT));
我已经从这里下载了这个库。
谢谢。