Paypal question: payment confirmation...?

Hello Kirupians,

Does any of you have experience with working with Paypal?

I’m doing some investigation for a client who wants me to create a website that has paid music downloads. I’ll do this in AS3.

I understand that I need to create a PayPal-button that sends variables to https://www.paypal.com/us/cgi-bin/webscr

This’ll take you to a PayPal page where you can add the item to your cart.

My question comes down to this: how will I know that the payment has actually been made, and is ‘okayed’ by PayPal, so I can proceed with the download?

Many thanks in advance!