I'm really sorry, but I guess my confusion is:
- How is the existing functionality different from the expected functionality? Is it just that the user cannot use a credit card but only their debit card?
- Upon paying for the digital goods, is the user presented with a way of downloading them? Or is that the part that isn't working?
- What are the contents of your thankyou.php page? I know that you've been having a difficult time posting code, so posting it here as an attachment should work just as well.
- What are you hoping that utilizing IPN will accomplish for you?