Using PAYPAL button

I need to be able to take payment from an app using the PAYPAL button where the user will purchase credits for a service but need feedback so I know if the transaction is successful so I can update the credits against their account via a web service.
Has anyone done anything similar. It would be much appreciated if you could point me in the right direction.