Paypal allows you to register a notification URL, which is part of the IIRC system for immediate notification of payment. Therefore, if someone pays for a delay in payment (for example, a bank transfer), the transaction will be updated in a few days. You need to have an application (web page) on your server that can call Paypal with transaction data to update the payment.
You will need to create an initial transaction record on your system when paypal redirects you back, so refer to their documentation for this. I also recommend looking at OSCommerce or Zen cart for how they do it, as they support the same thing.
source share