In http request it working fine (local environment), but when I change to cloudflare Full (strict), it return error of time out. I try to add my ssl certificate config, but still not working!
nginx/Site-enabled
ssl_certificate /etc/ssl/cert.pem;ssl_certificate_key /etc/ssl/key.pem;
POST request
public function applyFabricToken() { $ch = curl_init(); $headers = array("Content-Type: application/json","X-APP-Key: " . $this->fabricAppId ); curl_setopt($ch, CURLOPT_URL, $this->BASE_URL . "/payment/v1/token"); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 0); $payload = array("appSecret" => $this->appSecret ); //print_r(json_encode($payload));exit; $data = json_encode($payload); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);// for dev env //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // for dev environment only // Enable SSL verification for production curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); //curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/your/client_cert.pem'); //curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/your/client_key.pem'); // Timeout in seconds curl_setopt($ch, CURLOPT_TIMEOUT, 30); $authToken = curl_exec($ch); return $authToken; }
Error Timeout