hey,
a quick check look in the catalog/includes/modules/payment/paypal_ipn.php about like ~344
look for
$parameters['return'] = tep_href_link(
$parameters['cancel_return'] = tep_href_link(
make sure they are set to:
$parameters['return'] = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
$parameters['cancel_return'] = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL');
you want paypal to return to checkout_process.php or the qty will not be deducted. I set the "return url" in my paypal account to auto return to checkout_process.
On another note, I believe all this should have taken place in the ext/modules/payment/ipn.php, which is where the 'notify_url' comes back from paypal. that is why there is a delay in posting the order_status change. It happens when paypal sends back the info to ipn.php, in paypal_ipn.php:
$parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php'
so, ipn.php takes care of changes in order status: cancel, refund, verified, etc...
checkout_process.php will address cart, and properly populating the database
cheers