Paypal can return a "0" instead of a real transaction ID when testing sales through the Paypal Sandbox.
To make sure you are sent a real transaction ID, check to make sure the buyer AND the seller email addresses you're using are both added to the sandbox and both are confirmed.
Keep in mind when confirming Sandbox email accounts, the confirmation email will be sent to the Email section in your developers account, not to the real email account.