Laravel has no problem with PHP's CURL implementation or the more elegant guzzle - I've used both. More likely the issue is somewhere else in your conversion. Are you sure that $this->_server is properly set in your converted code? What do curl and Guzzle return? i.e. if you dd($client->post($this->_server, $vPOSData));
Nov 13, 2015
2
Level 1
Guzzle or Curl For Handling Vpos Requests ?
Hi,
I'm converting my e-commerce project to Laravel. I was using cURL for vpos requests.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->_server);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 90);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vPOSData);
$ch = curl_exec($ch);
@curl_close ($ch);
return $ch;
When i dd for $VPosData i get correct results. But i'm getting blank page. I think there exists a problem with cURL in Laravel.
In my project it is working but in Laravel it fails. Some of friends in Stack offers me Guzzle.
I tried Guzzle like
$client = new Client();
return $client->post($this->_server, $vPOSData);
Also it fails and i got a blank page. I stucked. What should i do ?
Normally the system post data the bank. And redirects 3D secure page for sms password. But blank page and no redirecting.
Please or to participate in this conversation.