Monday 20 June 2011 12:57:11 am
Hello, I'm trying to make a redirection of POST data to another site and then to redirect to the next page. So far, I've been experimenting with the cURL functions of PHP, with no luck. What I'm trying to do here is: Take POSTed data from the Gateway => success, Send POSTed data to another site => success, Redirect to the site with the POSTed data => unsuccessful. I get a kernel(20) error on my site because it tries to redirect me to /1, and not to my appointed site. The code so far (in the eZRedirectGateway function createRedirectionUrl) is:
$ch = curl_init($server);
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)" );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
$response=curl_exec($pg);
curl_close($pg);
return $response; Any suggestions? PS. I also tried to modify the header of the cURL, but to no avail. PPS. And no, I can't use GET, the site of the payment only accepts POSTed data.
|