This PNREF variable is the transaction id that PayPal passes back. I do know what you mean though about the other transaction id that you see in the email. I have looked into this issue recently and found that this is just the internal PayPal transaction id and is not a value that is passed back to you. It is just present on any email receipts that they send so that there is a reference for the transaction in there system.
It may be possible that things have changed in the last few weeks but this was how I remembered it working when I last looked into this. There should be more details about this in the PayPal developer forums.