whilst waiting for your reply I reverted to my back up version of the site where I had got the paypal bit working. I read on one of the threads on here about changing the paypal settings from within the paypal site to redirect to site after transaction. I went into this to tell it to redirect to my pp_checkout_success.php page, I then put through a transaction and it worked it redirected to my pp_checkout_success.php page, it carried over the order id and the shipping details. However I would like to display the paypal transaction number over to this page and also include it in an order confirmation email. It looks like this information is carried over in the URL. This is an example of the url that I see:
How can I get this transaction number to appear on the page and in the order confirmation email?