1

I am using https://github.com/darthsoup/laravel-whmcs package for integration of WHMCS APIs I set up my WHMCS_API_URL, WHMCS_API_IDENTIFIER, WHMCS_API_SECRET and WHMCS_API_ACCESSKEY in .env file my Laravel Application I put code for fetching my clients by following code in my controller


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DarthSoup\Whmcs\WhmcsManager;

class WhmcsController extends Controller
{
    //
    private WhmcsManager $whmcsManager;

    public function __construct(WhmcsManager $whmcsManager)
    {
        $this->whmcsManager = $whmcsManager;
    }

    public function index()
    {
        $result = $this->whmcsManager->client()->getClients();
        dd($result);
    }
}

I dump die the results but I am getting the above title error, I don't know to tackle it and even I also used cURL to fetch data

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://billing.pakchamp.com/includes/api.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt(
    $ch,
    CURLOPT_POSTFIELDS,
    http_build_query(
        array(
            'action' => 'DomainWhois',
            // See https://developers.whmcs.com/api/authentication
            'username' => 'WHMCS_API_IDENTIFIER',
            'password' => 'WHMCS_API_SECRET',
            'id' => '1',
            'domain' => 'exampkhkjhkjhkjlehhkuhuhuih.com',
            'responsetype' => 'json',
        )
    )
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
dd($response); 

now using CURL I am getting false, please help me to solve this issue.

Adnan Ali
  • 61
  • 6
  • The error message indicates that the SSL certificate is expired. It seems that the current certificate has been issued today. Did that solve you issue? – Dennis Oct 13 '22 at 16:54
  • Thanks for reply Dennis but I am working on localhost using laragon – Adnan Ali Oct 15 '22 at 05:09
  • In your `config/whmcs.php` file, what did you configure the `WHMCS_API_URL`? It's prefixed with https by default. – Dennis Oct 17 '22 at 07:48
  • In my config/whmcs.php I wrote https://billing.pakchamp.com, oh yeah u are right I wrote https with my URL I thinks that's why I was getting error. – Adnan Ali Oct 19 '22 at 12:31

0 Answers0