This is a fix which updates the status always after receiving an IPN notification (for register_globals OFF or ON) .

For all versions :

Find in catalog/includes/modules/payment/paypal_ipn.php


tep_session_register('cart_PayPal_IPN_ID');
// Terra register globals fix
//$_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id;


Replace with

// FS start
$GLOBALS['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id;
// FS stop
tep_session_register('cart_PayPal_IPN_ID');
// FS start
// Terra register globals fix
//$_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id;
// FS stop

The problem : $cart_PayPal_IPN_ID was not always a global (e.g. between functions confirmation and process_button.

Only this text included !

More...