Unsupported operand types Error. When does paypal return after payment?

I get an error Unsupported operand types in / home 4 / moses / public_html / mywebsite.com / ipn-page-template.php on line 27.

My entire code is on the ipn page.

$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"; } 
+5
source share
1 answer

check the return values โ€‹โ€‹of these 2 - make sure they are / ints / bools strings, and not something more complex like an array or object

 var_dump($response); var_dump($status); 
0
source

Source: https://habr.com/ru/post/1247704/


All Articles