Php 不支持的操作数类型错误。付款后贝宝什么时候回来?

Php 不支持的操作数类型错误。付款后贝宝什么时候回来?,php,paypal,payment-gateway,Php,Paypal,Payment Gateway,我遇到错误 第27行的/home4/moses/public_html/mywebsite.com/ipn-page-template.php中不支持的操作数类型 我在ipn页面上的所有代码。 $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; // Set up request to PayPal $request = curl_init(); curl_setopt_array($request, array ( CURL

我遇到错误 第27行的/home4/moses/public_html/mywebsite.com/ipn-page-template.php中不支持的操作数类型

我在ipn页面上的所有代码。

$url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';

// Set up request to PayPal
$request = curl_init();
curl_setopt_array($request, array
(
    CURLOPT_URL => $url,
    CURLOPT_POST => TRUE,
    CURLOPT_POSTFIELDS => http_build_query(array('cmd' => '_notify-validate') + $ipn_post_data),
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_HEADER => FALSE,
    CURLOPT_SSL_VERIFYPEER => TRUE,
    CURLOPT_CAINFO => 'cacert.pem',
));

// Execute request and get response and status code
$response = curl_exec($request);
$status   = curl_getinfo($request, CURLINFO_HTTP_CODE);

// Close connection
curl_close($request);

if($status == 200 && $response == 'VERIFIED')
{
    $subject = "valid";
    $message = "good";
}
else
{
    $subject = "invalid";
    $message = "bad";
}

检查这2个的返回值-确保它们是字符串/整数/布尔,而不是更复杂的数组或对象

var_dump($response);
var_dump($status);

您确定已定义$ipn_post_数据并且它是一个数组吗?