hey guys was hoping you can help me out.
I am implementing an payment gateway, and sending the request via curl by keep getting error no.
35, “Unknown SSL protocol error in connection”
It works correctly if I post a form to the url directly through my browser, gets me the right response etc, but problem is when I do it with curl.
My small, minified version of code is
$query="type=sale&username=demo&password=password&ccnumber=4111111111111111&ccexp=1013&amount=50";
$request = curl_init("https://secure.msicharge.com/api/transact.php"); // initiate curl object
curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
curl_setopt($request, CURLOPT_POSTFIELDS, $query); // use HTTP POST to send form data
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.
$data = curl_exec($request);
echo $data;
echo curl_errno($request),curl_error($request) ;
curl_close ($request);
Any ideas? thanks in advance.
You can also try this