Fixing My PayPal "Add To Cart" Button
Tuesday, August 25th, 2009Intro. I previously blogged about how to create a PayPal "Add To Cart" button at runtime. We use this button on our Buy Now pages. To see an example, click on the following link, and then click any of the Buy Now links:
http://www.edxelectronics.com/PartSearch/PartSearch.aspx?SearchPart=AD5
On this page you'll see the "Add To Cart" button which is created at runtime.
The Problem. This week our users started reporting the following error from paypal.com after they clicked our "Add To Cart" button:
"Sorry — your last action could not be completed"
Yikes! Nobody can buy our products online.
A bunch of googling revealed that PayPal did an upgrade and changed some urls that we were using. And they didn't even tell us!
The Solution. We changed our runtime generated url's from:
https://www.paypal.com/cart/add=1 . . .
to:
https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1 . . .
and everything went back to normal.