this is the main file without a couple of functions which work OK, like the IdentityCheck() and showError(). It passes the identity check because my writeStatus() function (also not shown) writes the value "1" to the file, used to determine the stage below. So I know it processes writeStatus($_POST, "1"); Then it does not do the CURL. I have also tried the original header Location redirect commented out instead of the CURL, which also fails. If I by pass the checks below straight to the header and go to the callback file in my browser, the header redirect does work. So this is why it seems the gateway fails at the header or CURL stage.
As stated though... if I entered the index.php?main_page=checkout_process&zenid=xxxx on another computer, I get a "Whoops Session expired" message, but it works when entered on the computer I have logged into the store and made the order with. This is why I think maybe the header and CURL IS working, but the issue is the URL index.php?main_page=checkout_process&zenid=xxx is not working when called from another computer. Just a hunch.
Code:
if ($_POST['transStatus'])
{
if($_POST['transStatus']=='Y')
{
$IdentityCheck = IdentityCheck();
if ( (strcmp ( $_POST ['IdentityCheck'], $IdentityCheck ) == 0))
{
writeStatus($_POST, "1");
//header('Location: index.php?main_page=checkout_process&zenid='.$_POST['donorref']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.mydomain.org.uk/index.php?main_page=checkout_process&zenid='.$_POST['donorref']);
curl_exec($ch);
curl_close($ch);
}
else
{
writeStatus($_POST, "2");
showError();
}
}
else
{
writeStatus($_POST, "3");
showError();
}
}
else
{
writeStatus($_POST, "4");
showError();
}
Bookmarks