Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in
  • Welcome
    • Guidelines
    • News and Events
    • Suggestions for PayPal
    • General Discussions
  • PayPal Help Community
    • Managing Account
    • Transactions
    • Wallet
    • Security and Fraud
    • Products & Services
    • Reporting
  • MTS Community
    • PayPal Upgrade Community
    • PayPal Payments Standard
    • REST APIs
    • NVP/SOAP APIs
    • SDKs
    • Sandbox Environment
    • PayPal Reporting
    • Payflow
    • Ideas for MTS
    • Client-side Integration
    • Server-side Integration
  • The Archives
    • PayPal Help Community Archives
      • Managing Account Archives
      • Transactions Archives
      • Wallet Archives
      • Security and Fraud Archives
      • Products & Services Archives
      • Reporting Archives
    • Help Community
      • PayPal Basics Archives
      • Payments Archives
      • My Money Archives
      • My Account Archives
      • Disputes and Limitations Archives
      • Products and Services Archives
      • PayPal Credit Archives
    • Merchant Community
      • Merchant Products
      • Business Tools Archives
      • Reporting Archives
      • Managing Risk and Fraud Archives
    • Help Archives
      • About Business (Archive)
      • About Payments (Archive)
      • About Settings (Archive)
      • About eBay (Archive)
      • About Protections (Archive)
      • About Products (Archive)
    • Social and Your Voice Archives
      • Off Topic (Archive)
      • My Feedback for PayPal (Archive)
    • About PayPal Archives
      • Watercooler (Archive)
      • Tax Information (Archive)
      • Fees (Archive)
      • eBay and PayPal (Archive)
      • Coupons and promotions (Archive)
    • My Account Archives
      • My account settings (Archive)
      • Account limits and verification (Archive)
      • Account balance (Archive)
      • Bank accounts and credit cards (Archive)
    • Payments Archives
      • Sending money (Archive)
      • Receiving money (Archive)
      • Refunds (Archive)
      • Donations and Fundraising (Archive)
    • Disputes and Security Archives
      • Disputes and claims (Archive)
      • Fraud, phishing and spoof (Archive)
    • My Business Archives
      • Merchant services (Archive)
      • Reporting and tracking (Archive)
      • Shipping (Archive)
    • PayPal Products Archives
      • PayPal Debit Mastercard (Archive)
      • PayPal Extras MasterCard (Archive)
      • PayPal Mobile & Other Services (Archive)
      • Student Accounts (Archive)
      • Bill Me Later (Archive)
    • Getting to know PayPal
      • My PayPal account
      • Security and protection
    • Receiving and sending money
      • Buying with PayPal
      • Selling with PayPal
    • PayPal Here UK
      • PayPal Here News and Events
      • PayPal Here Community
      • Chip and Pin Card Reader
      • PayPal Here App

The Community Forum will no longer be available starting June 30, 2025. Please note that the forum is now closed for new posts and responses, but previous posts will remain accessible for review until June, 30 2025. For comprehensive support options, please visit PayPal.com/HelpCenter
Merchant Technical Support: For technical support and related questions, please visit our Technical Support Help Center or Developer Central

If you want to report illegal content under the EU Digital Services Act, please do so here

since ‎Mar-24-2010
Country: United States
Type: Personal
dragon-fire
dragon-fire Contributor
Contributor
10
Posts
0
Kudos
0
Solutions
Friendly
Organized
New Look
Ice Breaker
Active
Your 3rd PayPal Anniversary
Your 10th PayPal Anniversary
Your 5th PayPal Anniversary
Your PayPal Anniversary
Pioneer
The Return
View all
Latest Contributions by dragon-fire
  • Topics dragon-fire has Participated In
  • Latest Contributions by dragon-fire

Re: Cart "continue shopping" return URL problem

by dragon-fire Contributor in PayPal Payments Standard
‎Feb-07-2024 03:52 PM
‎Feb-07-2024 03:52 PM
Hi Paul, What I did was put this script like this in the header of the home page: <script ="javascript" type="text/javascript"> var url = 'https://www.[your-nl-page.html]" if (window.history.length > 2) { window.location.href = url; } </script> In your situation, you would replace the [your-nl-page.html] with the URL of your nl page. Once someone has been to your site's home page, this script will redirect  (or forward) any returns to that page to that newsletter page. There may be another way to do this through the PayPal site, but this works just fine without the hassle of trying to find out where to do that on their site. If the home page is not the page that PayPal returns you to, simply put this code in the header of whatever page PayPal returns you to. That will see that the browser ends up back at your nl page. Good luck! Art ... View more

Re: Continue Shopping Link

by dragon-fire Contributor in PayPal Payments Standard
‎Apr-18-2022 09:13 AM
‎Apr-18-2022 09:13 AM
I revised the previous <script> which used:          if (window.history.length > 2)   and replaced it with:  var from = document.referrer.split('/')[2];      var url = '[Your_Shopping_Page_URL]';      if (from == "www.paypal.com")      {          window.location.href = url;      } The problem I ran into with the previous code was that if a visitor arrived at the site's index page after having visited any other pages (from any site) in that browsing session, they would be redirected to the shopping page immediately and never see the index page. This code only redirects to the shopping page if the previous page was the PayPal site (regardless of session history) which otherwise returns the visitor to the index page for the site by default instead of to the intended shopping page for the site. ... View more

Re: Continue Shopping Link

by dragon-fire Contributor in PayPal Payments Standard
‎Oct-02-2021 09:20 AM
‎Oct-02-2021 09:20 AM
I should add that any links in the files on your site to return to the home page should be to: www.[yoursite]/Home.html rather than simply www.[yoursite] as then they would link to the index.html file rather than the Home page and, having been to index.html, would be taken to the [PurchasePage] and be unable to see the Home page. ... View more

Re: Continue Shopping Link

by dragon-fire Contributor in PayPal Payments Standard
‎Oct-02-2021 09:11 AM
‎Oct-02-2021 09:11 AM
Hi BobMac21, The workaround I use is to have two files that are identical EXCEPT for adding this line at the end of <head> section in the index.html file (a normal landing page for any given site): <script type="text/javascript"> var url = 'https://www.[PurchasePage].html'; // Fix for PayPal's redirect to index.html. You need to know where (what *.html) you want to redirect to beforehand. if (window.history.length > 2) { window.location.href = url; } </script>   Then save a copy of the index.html (all lower case) file without that script, giving it the name you want to use as the "Home" page for the site (eg. Home.html) - the page one would return to if one wanted to return to the very first page they see when landing on your site, i.e. the Home page. The script var should use the name of the file for the page with the PayPal form you use - the [PurchasePage] you want to return to. The way this works is that when someone comes to your site, they arrive at the index page and that page visit is added to the history for that session.  As they browse through the site they may want to return to that first page, to review the contents seen on the index page. When they do, they're actually taken to the practically identical Home page (without the script) rather than the index page with the script. Any time they go to your [PurchasePage] and are taken to PayPal to check the cart, add to the cart, or whatever activity is allowed by your [PurchasePage]; they then would be automatically redirected back to that [PurchasePage] (from the index page that PayPal would have the user go to) by the code on the index page which redirects from the index page (PayPal's choice) to your [PurchasePage] (your choice). The script knows they've already been to the index page so sends them directly on to the [PurchasePage]. It's all far simpler than how the explanation makes it sound! ... View more

Re: Continue Shopping Link

by dragon-fire Contributor in PayPal Payments Standard
‎Jul-22-2021 06:12 PM
‎Jul-22-2021 06:12 PM
I figured out a workaround on this which involved having both an index.html page and a nearly duplicate Home.html page for the site which uses paypal for alumni dues payments. The only difference between the two pages is that the landing page (index.html) has this code at the end of the <head> section: <script ="javascript" type="text/javascript"> var url = 'https://www.[websiteURL]/[Paypal-Payment-Page].html';   // you need to know where you want to redirect to beforehand if (window.history.length > 2) { window.location.href = url; } </script> With this code, the page that you want to return to is the Paypal-Payment-Page url. The code checks the history of the site access, and if one has already visited the index URL (which is always the default landing page for the website URL), one is redirected from the index URL back to the PayPal payment page URL. Once on the site, set any return to the home page to the Home URL instead of the index URL. Hope that makes sense. ... View more

Re: Cart "continue shopping" return URL problem

by dragon-fire Contributor in PayPal Payments Standard
‎Apr-21-2021 09:01 PM
‎Apr-21-2021 09:01 PM
marpleweb The code I used only serves to redirect if it's not the first visit to the site at URL: SOMEUURL.org  If you can copy all the code on your home page to a new page (i.e. saving the copy as an html file such as Home.html), and ensure that the original home page is index.html, and have any links on the site redirect to SOMEURL.org/Home, it can provide all the information and links that the original SOMEURL.org page had (given that SOMEURL.org is actually SOMEURL.org/index even though that full URL doesn't appear in the URL browser address bar). With the code I provided in the index.html page ONLY, PayPal's redirects to your index page will in turn be redirected to your PayPal form page. You can then navigate your site as usual since the user won't see the index page again until they close the browser and open the link to your site (SOMEURL.org [which is actually SOMEURL.org/index]) at which point the code won't redirect since the window.history.length is less than 2. Once they've been on the site, any returns to your home page are to the home page at SOMEURL.org/Home which doesn't have the redirect code on it. ... View more

Re: Cart "continue shopping" return URL problem

by dragon-fire Contributor in PayPal Payments Standard
‎Apr-21-2021 07:53 AM
‎Apr-21-2021 07:53 AM
There may well be. I'll see if I can figure out how to code it that way. As is, on the site I have, the index page is only landed on at the bewigging of the session. After that, all visits to the page are as the "home" page which is identical except for the redirect code and a note as to when the site was last updated.  That is to say, the visitor first arrives at the SOMEURL.org page (the index page with the code) and from then on arrives at the SOMEURL.org/Home page.  I have a vehicle service appt today that will take most of the day, but will have a look this evening. ... View more

Re: Cart "continue shopping" return URL problem

by dragon-fire Contributor in PayPal Payments Standard
‎Apr-20-2021 05:00 PM
‎Apr-20-2021 05:00 PM
Finally came up with a solution. I added a small script to the head portion of the index page (site landing page) that redirects to the PayPal form submission page after the initial visit to the index page: <script ="javascript" type="text/javascript"> var url = 'https://www.SOMEURL.org/Paypal-Form2021.html'; // you need to know where you want to redirect to before hand if (window.history.length > 2) { window.location.href = url; } </script> Works like  a charm! ... View more

Re: Continue Shopping Link

by dragon-fire Contributor in PayPal Payments Standard
‎Mar-14-2021 11:03 PM
‎Mar-14-2021 11:03 PM
I've been having this problem too with PayPal returning me to the main index page for the site, but only recently - it used to return me to the page I was on when adding to the cart. This doesn't seem to be happening with Firefox, though - only in Chrome. ... View more

Cart "continue shopping" return URL problem

by dragon-fire Contributor in PayPal Payments Standard
‎Mar-13-2021 12:28 AM
‎Mar-13-2021 12:28 AM
I have a site where I have a form set up to add items to a cart which works fine, but once the item is added to the cart and I'm taken to the cart page to view the cart, when the "Continue Shopping" button is clicked, I'm taken back to the home page of the site instead of returning to the shopping form page. I've tried several things with no success, including using the shopping cart form URL in both a return command and a redirect command ( <input type="hidden" name="redirect" value=" <Removed> " /> ), as well as using base target of "_self" in the <head> of the page that the shopping form is on. PayPal used to return me to the shopping page but it seems something has changed on the PayPal end so that that no longer happens, returning me instead to the index/home page. Any suggestions on why, and, more importantly, how to remedy the situation? ... View more
Labels:
  • Labels:
  • Carts
  • PayPal HTML Buttons
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros
Welcome to the PayPal Community!