I am having problems with registration on paypal. I need to get and add data to my database when a new use and registers with my website.
Basically the website register new user with a fee. I need register data on paypal pay now button, so you will be redirected to paypal pay page and add data to database at the same time. or when pay successfully.
Any help please, I am using mvc.
I suggest you take a look at the PayPal Instant Payment Notification guide. This product does exactly that; it's an asynchronous server-to-server notification (with validation) which does just that; it notifies you of transactions, both completed and pending, so that you can action them on your end.
Be that by updating your database, XHR and a digital download or sending an email to your buyer.
The best part is that it notifies you long after the fact as well; say, for example, if a buyer files a chargeback case. You'll got notified in that case and will be able to appropriately update the buyer's transaction on your end (revoke permissions to your service, for example).
We have sample IPN sample code up on our GitHub repo.