Internal Server Error 500


Internal Server Error 500

HI @Panamera  and @swaritsharma,


Below is the sample curl I am using to call the endpoint.


The below code was extracted from the sample code provided in the project.


$username = '........';
$password = '.........';
$url = '';

$postData = json_decode('', true);

$curl = curl_init();
// set timeout, if needed
curl_setopt($curl, CURLOPT_TIMEOUT, 0);
// set connect timeout, if needed
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);

// return the result on success, rather than just true
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
"Accept" => "application/json",
"Authorization" => "Basic " . base64_encode( $username. ":" .$password),
// "x-pay-token" => getXpayToken($postData, $url, null, $password)

// disable SSL verification, if needed
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
//curl_setopt($curl, CURLOPT_PROXY, '');
//curl_setopt($curl, CURLOPT_PROXYPORT, '');
curl_setopt($curl, CURLOPT_SSLCERT, getcwd().'/rsa/keys/cert.pem');
curl_setopt($curl, CURLOPT_SSLKEY, getcwd().'/rsa/keys/key_42xxxxxxxx.pem'); //$this->config->getPrivateKey());
curl_setopt($curl, CURLOPT_CAINFO, getcwd().'/rsa/keys/DigiCertGlobalRootCA.crt'); //$this->config->getCaCertPath());
// curl_setopt($curl, CURLOPT_CAINFO, getcwd().'/rsa/keys/VDPCA-SBX.pem');
//curl_setopt($curl, CURLOPT_PROXYTYPE, '');
//curl_setopt($curl, CURLOPT_PROXYUSERPWD, $username.":".$password);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");

curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");

curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($postData));
curl_setopt($curl, CURLOPT_URL, $url);

// Set user agent
//curl_setopt($curl, CURLOPT_USERAGENT, $this->config->getUserAgent());
curl_setopt($curl, CURLOPT_VERBOSE, 0);

// obtain the HTTP response headers
curl_setopt($curl, CURLOPT_HEADER, 1);

// Make the request
$response = curl_exec($curl);


Please, kindly reply as I have been on this issue going to 3 weeks now.


I look forward to your quick response.


Thank you