Guys, there is an easier solution here. Paypal allows you to pass these values ββbefore then it will spit them back to you. There are actually two methods for returning data: a return URL, which ends after returning with the returned values ββ(Iβm not very lucky that this works), and then a separate function that sends you a message after the transaction is completed, to a separate one on your site, where You can return all the variables that you sent to the site. I suggest the latter, because on the Buy Now page there is a possibility that the user will not be returned to the site, because the user interface of the return button is rather weak at the end of PayPal.
To set it up, you need to log in to your PayPal account, click on myaccount> profile> website payment settings. Enabling "billing" will do the trick. After you have configured it correctly, upon completion of the transaction, it will send a message to the page of your choice about everything that you sent it .... remember, you can send variables such as Name, Address, etc. defining them correctly in the form. All available variables are found here.
Of course, you can go through capturing elements from the form through Jquery or the like, and then do onclick save for DB, but why fight it? This is a hell of a lot more work and can have problems if Javascript is disabled.
Do not forget to create a test site for the sandbox! Good luck.
source share