5
tôi đang nhận được lỗi loại toán hạng không được hỗ trợ trong /home4/moses/public_html/mywebsite.com/ipn-page-template.php trên dòng 27.Các loại toán hạng không được hỗ trợ Lỗi. Khi paypal trở lại sau khi thanh toán?
tất cả các mã của tôi trên trang 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";
}
Bạn có chắc chắn $ ipn_post_data được định nghĩa và là một mảng? – Algoleigol