I integrated PayPal\'s Identity API in my webpage. As usual when user clicks login with paypal(JavaScript button) it opens a new window for login purpose. But after
login with paypal
I had the exact problem, but the solution is in the documentation here:
https://developer.paypal.com/docs/classic/express-checkout/digital-goods/ClosingWindow/
Refer to "Reloading Parent Page to a Specific URL" and add this script to the return and cancel pages.