Welcome Guest, Not a member yet? Register   Sign In
callback post vars "disappearing"

[eluser]The Questioner[/eluser]
I had to do something similar with the Barclaycard payment gateway. I used the following code to populate an array with the POST variables (sending the POST array directly doesn't seem to work), and then used CURL to POST it to my CI controller:

//open connection
$ch = curl_init();

$fields = array(

//set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POST,count($fields));
//curl_setopt($ch, CURLOPT_USERPWD, 'admin:mduk'); //only include this if you have htaccess applied across whole site
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);

//execute post
$result = curl_exec($ch);

//close connection

Messages In This Thread
callback post vars "disappearing" - by El Forum - 10-05-2011, 08:06 PM
callback post vars "disappearing" - by El Forum - 05-12-2012, 08:47 AM
callback post vars "disappearing" - by El Forum - 05-12-2012, 11:01 AM

Theme © iAndrew 2016 - Forum software by © MyBB