使用PayPal的Paypal IPN立即购买并插入/更新到数据库中

I really need your help for a project I am doing.

I have a buy now button on my website, with the following values:

$1.00
$5.00
$10.00
$25.00
$50.00

The user can access the buy now button once they are logged in, I need for the buy now button once confirmed to verify and update the users mysql field "purchased". So if the user buys $10.00 the user field will be $10.00 if they buy another $5.00 it will be $15.00 and so on.

Long Story Short:

I need the value of what they selected to be verified with PayPal, and then updated by there userid.

Mysql Fields:

purchased = Amount they verified and purchased.

userid = Account User ID that needs to be updated with the purchase.

I am just having trouble with the IPN side, please help.

Thank you so much!