manoaratefy Posted April 3, 2018 Share Posted April 3, 2018 Good morning, I'm using API to sync pricing between WordPress and WHMCS, using GetProducts. The problem is when I make the request with a specific pid, there is no result (totalresult = NULL). But when I don't specify pid, all products are in the result, including the pid which I specified. What's wrong? Here is my code: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://path.to.whmcs/includes/api.php'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( array( 'action' => 'GetProducts', 'username' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'password' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'responsetype' => 'json', 'pid' => 53 ) ) ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close($ch); $response = json_decode($response); var_dump($response); ?> Link to comment Share on other sites More sharing options...
manoaratefy Posted April 21, 2018 Author Share Posted April 21, 2018 Problem has been solved after upgrading to 7.5. Link to comment Share on other sites More sharing options...
Recommended Posts