Posts Tagged ‘ecommerce’

Posted on November 10th, 2007

PayPal Buttons; Hide Email Addresses from Spam Bots


Lately I’ve been creating a lot of PayPal “Buy Now” and “Add to Cart” buttons for a few of my customer’s websites. The problem with creating these buttons is that they require an email address to be added to the HTML code, which in turn gets easily harvested by spam-bots.

A simple alternative to using an email address is to use a “referral code” instead. To get the referral code login to PayPal and click on “Referrals” located near the footer of the page. On that page you will find a link like: Copy the “VXDE78NC4F3K2” part of the code and replace the hidden input value of “business” with it in your button code.

Original Code:

Revised Code:

You may ask why I wouldn’t just use PayPal’s encrypted payment buttons. Well, By creating non-encrypted buttons you can easily edit them (e.g. change Price, Item Name, etc.), create new ones fast and dynamically input values via PHP.