PayPal Add to Cart not working on iOS

DJCraig1
Contributor
Contributor

I'm building a website that uses standard "Add to Cart" buttons from PayPal. Everything works fine on the desktop, and in the mobile Chrome browser, but on iOS, the Add to Cart buttons don't work. They pull up a new tab, which gives me a spinning "loading" ring, which continues to spin indefinitely. The phone I'm using for testing is an iPhone 6+ running iOS 11.

 

Here's the website:

https://www.NightOwlCircusArts.com

 

Unfortunately you do have to register a free account to actually view the "Add to Cart" buttons I'm referring to, so here's the source code I'm using for one of the buttons:

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
                <input type="hidden" name="cmd" value="_s-xclick">
                <input type="hidden" name="hosted_button_id" value="EPP74NSCRTC7E">
                <input type="hidden" name="custom" value="a%3A2%3A%7Bi%3A0%3Bs%3A27%3A%22info%40nightowlcircusarts.com%22%3Bi%3A1%3Bs%3A18%3A%22Single+Group+Class%22%3B%7D">
                <input type="image" src="images/addtocart1.png" border="0" name="submit" alt="Add to Cart" width="159" height="26" class="addtocart">
                <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
            </form>

Any suggestions on how to get the buttons to work on iOS? I don't want to lose sales because the button won't work!

Login to Me Too
13 REPLIES 13

CandL
Contributor
Contributor

For those still looking for a solution on this here was my fix after working with PayPal support.  Instead of deleting the code “target = PayPal” as recommended in previous posts they had me change the very first line in my code to: <form target=“_self” 

 

Making that change finally resolved the issue for me although it may not be a 100% fix for everyone using an iOS device.  For example when I changed the code I used Google search on my iPad to go to my website and test it out and found that on the individual web pages where I had “add to cart”  buttons you could click on the “view cart” button and it would now correctly direct me to the shopping cart versus the PayPal home page.  However if I would select the “view cart” button on any of my web pages that did not contain “add to cart” button coding the redirect would continue to go to the PayPal home page.  The PayPal support rep could not understand this and frankly I don’t think he believed me because he and others at the support center testing on iPhones were convinced the problem was resolved so he had me send him a video clip of me reproducing the issue.  After seeing my video he then suggested I delete and re-download the Google search app on my iPad and bingo that fixed the issue completely.  The “view cart” button was now directing correctly on every page of my website.

 

Obviously we cannot be telling customers and potential customers to delete and reinstall the Google search App on their iOS devices and what I experienced on my iPad may not be the same thing every iOS device user will experience since the PayPal support team could not reproduce the issue on the iPhones they were testing with.  For the small number of customers that may experience the problem I encountered with my iPad the code fix will at least correctly direct them to the shopping cart when they click the “view cart” button on those pages that have “add to cart” buttons on them and of course the “add to cart” buttons will now direct correctly which really was the main issue to start with.  Bottom line it’s not a 100% guaranteed fix for everyone that may be shopping your website with an iOS device but it’s probably as good as it’s going to get.  

 

Also note that when creating any new “add to cart” buttons using the PayPal button creation tool you will need to manually apply the code fix I referenced above when pasting the code in to your web site.  I hope this info helps others that are still experiencing this problem.

 

Login to Me Too

Elizabeth108
New Community Member

I have tried all the options above and I still can't get paypal to work. I have removed "paypal" and also tried "_self" solutions and neither help. I get all the way to putting credit card details in and then it tells me that paypal is not working at the moment... So frustrated as this should be easy. Anyone else got anything that I can try? 

 

Login to Me Too

ClareF
Contributor
Contributor
I have this problem also. I return to cart with another item and the first item is gone. I tried both these solutions. Any further ideas? It just keeps adding to a new cart - like it has forgotten the old one. My original code was this: <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <font size="4"><strong><font color="#000000" face="verdana"> <input type="image" src="https://www.paypal.com//en_GB/i/btn/sc-but-03.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> <input type="hidden" name="add" value="1" /> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="business" value="info@email address" /> <input type="hidden" name="item_name" value="Starter grid" /> <input type="hidden" name="item_number" value="Starter Crystal grid" /> <input type="hidden" name="amount" value="15.00" /> <input type="hidden" name="currency_code" value="GBP" /> </font> </strong> </font> </form> I then tried <form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post"> and i tried <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> Any ideas I would very much appreciate
Login to Me Too

JayT222
Contributor
Contributor

I had the same issue and changed

 

target="_blank"

 

to

 

target="_self"

 

and this solved the problem

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.