Any Idea why cart will not clear on pp confirm
Hi, I've tried numerous ways to clear session variables and cart on the PayPal confirm page.
No code below </html> works, the only way I was able to clear it was by putting this code in the body of the page.
Any ideas why the code would not work below </html>
Cheers
<?php
@session_start();
if (!$eCart1->IsEmpty()){
// WA_ClearSession
$clearAll = FALSE;
$clearThese = explode(",","PayPal_ECO_PayerID,PayPal_ECO_Token");
$eCart1->ClearCart();
if($clearAll){
foreach ($_SESSION as $key => $value){
unset($_SESSION[$key]);
}
}
else{
foreach($clearThese as $value){
unset($_SESSION[$value]);
}
}
}
?>