private function curl($query_string)
    {
        $curl = curl_init();

        curl_setopt($curl, CURLOPT_POSTFIELDS, $query_string);
        curl_setopt($curl, CURLOPT_VERBOSE, 1);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);
        curl_setopt($curl, CURLOPT_CAINFO, $this->cert_path); // because of Self-Signed certificate at payment server.
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_SSLCERT, $this->cert_path);
        curl_setopt($curl, CURLOPT_SSLKEY, $this->cert_path);
        curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $this->cert_pass);
        curl_setopt($curl, CURLOPT_URL, $this->submit_url);

        $result = curl_exec($curl);

        return $result;
    }
private function curl($query_string)
    {
        $curl = curl_init();

        curl_setopt($curl, CURLOPT_POSTFIELDS, $query_string);
        curl_setopt($curl, CURLOPT_VERBOSE, 1);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);
        curl_setopt($curl, CURLOPT_CAINFO, $this->cert_path); // because of Self-Signed certificate at payment server.
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_SSLCERT, $this->cert_path);
        curl_setopt($curl, CURLOPT_SSLKEY, $this->cert_path);
        curl_setopt($curl, CURLOPT_SSLKEYPASSWD, $this->cert_pass);
        curl_setopt($curl, CURLOPT_URL, $this->submit_url);

        $result = curl_exec($curl);

        return $result;
    }
private function curl ( $ query_string ) { $ curl = curl_init ( ) ; curl_setopt ( $ curl , CURLOPT_POSTFIELDS , $ query_string ) ; curl_setopt ( $ curl , CURLOPT_VERBOSE , 1 ) ; curl_setopt ( $ curl , CURLOPT_SSL_VERIFYHOST , 2 ) ; curl_setopt ( $ curl , CURLOPT_SSL_VERIFYPEER , 1 ) ; curl_setopt ( $ curl , CURLOPT_CAINFO , $ this -> cert_path ) ; // because of Self-Signed certificate at payment server. curl_setopt ( $ curl , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ curl , CURLOPT_SSLCERT , $ this -> cert_path ) ; curl_setopt ( $ curl , CURLOPT_SSLKEY , $ this -> cert_path ) ; curl_setopt ( $ curl , CURLOPT_SSLKEYPASSWD , $ this -> cert_pass ) ; curl_setopt ( $ curl , CURLOPT_URL , $ this -> submit_url ) ; $ result = curl_exec ( $ curl ) ; return $ result ; }
Curl is responsible for sending data to remote server, using certificate for ssl connection
@param  string $query_string created from an array using method build_query_string
@return string returns tbc server response in the form of key: value \n key: value. OR error: value.
Curl is responsible for sending data to remote server using certificate for ssl connection