Hack 38 Include Payment Buttons in Email Messages 
Use the PayPal Payment Request Wizard to send
Pay Now buttons from Microsoft Outlook.
Sending invoices via email with PayPal's Request
Money feature [Hack #17]
is a quick and effective way to ask someone to pay you. The
Pay Now buttons
PayPal includes in the resulting email make it easy for your
customers to pay you; after two clicks and a login, customers with
PayPal accounts can send you money in less than a minute.
But the Request Money feature has its limitations.
While the email appears to come from you, it's
actually sent from PayPal, which means that you
won't be able to customize it fully. If you need to
include pictures, files, hyperlinks, custom HTML, or multiple
purchase buttons, you'll have to send the email
yourself.
4.12.1 Creating PayPal Payment Hyperlinks
Adding a
PayPal payment hyperlink to your own email
involves nothing more than typing a simple URL [Hack #18] .
The required parameters to create a basic hyperlink are email
address, payment amount, and item name.
However, there are many optional parameters you can include in the
hyperlink to help you provide a more complete payment record, such as
the currency, item number, quantity, shipping, and request for
shipping address. For example:
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=
email%40paypalhacks%2Ecom&amount=10%2E00¤cy_code=USD&item_name=
jersey&item_number=1001&quantity=1&shipping=3%2E00&no_shipping=0
As you can see, the hyperlink begins to become unwieldy. Hyperlinks
this long or longer cause problems because email programs chop them
up into smaller pieces when they wrap the text. More than likely,
only the first piece will be hyperlinked and a customer will not
think twice about clicking it and attempting to complete the
transaction with incomplete information.
The simplest solution is to run the address through
TinyURL
(http://tinyurl.com), which will
convert it to something that looks like this:
http://tinyurl.com/2tqz8
The resulting link is always short enough to be spared the
aforementioned word wrap. Unfortunately, the
https://www.paypal.com/ prefix will be lost, and
your more diligent customers might
avoid it.
 |
See [Hack #39] for another, more
official way to get shortened payment URLs, and protect your email
from spammers in the process.
|
|
4.12.2 Using the PayPal Payment Wizard
Want something more professional-looking
than a bare URL in your emails? Nearly all modern email programs
support HTML (much to the bane of the minimalists among us), which
means that you can replace ordinary URLs with hyperlinked, graphical
buttons right in your email messages.
Simply use your email software's formatting tools to
insert an image and then link it to a payment URL you construct. In
fact, URLs in hyperlinks can be as long as 1024 bytes (characters),
which is plenty for PayPal's payment URLs. Of
course, there's a cost: these payment buttons can be
time-consuming to create...until now.
Enter the PayPal Payment Wizard, a free add-in toolbar for
Microsoft
Outlook and Microsoft Outlook Express that allows you to painlessly
insert payment buttons into your emails.
You can create five different types of PayPal
payment buttons, each
with six different button designs:
- Payment Button (Basic)
-
This type of button is easiest to use,
because it requires only your email address and payment amount, but
it offers the fewest options.
- Product Button
-
This type allows you to enter product details
and request a shipping address [Hack #28] .
- Service Button
-
This type allows you to enter a service
description [Hack #30] .
- Auction Payment Button
-
Use this to request payment for an auction
item [Hack #31] .
- Donate Button
-
Use this to allow the donor to specify the
donation amount [Hack #40] .
To use the Payment Wizard toolbar, start by downloading it from
http://www.paypal.com/outlook and
installing it on your computer. You might be asked to close Microsoft
Outlook if it's open.
 |
The PayPal Payment Wizard currently supports only Microsoft Outlook
and Outlook Express on Windows. If you're using
Eudora or some other email software, or if you are using a Mac or
Linux, you'll have to create payment buttons
manually.
|
|
To insert a button with the Payment Wizard, follow
these steps:
Open Outlook or Outlook Express. Click the Payment Request Wizard icon on the toolbar (shown in Figure 4-7).

When you see the first page of the wizard, click Next. On the Payment Button Type screen, choose one of the five
aforementioned payment button types. For this example, select the
second option, Product Button, and click Next. The Product Button requires only the email address to which payment
should be sent, and the payment amount, as shown in Figure 4-8.

There are several optional fields. You can specify the subject of the
payment email you'll receive if the recipient pays.
The First Name and Last Name fields are not currently used, so you
can leave them blank. You can leave the Buyer's
Email, Subject, First Name, and Last Name empty, because they are not
required. If your product requires shipping, turn on the Solicit Shipping
Address option. PayPal will ask the buyer to specify a shipping
address. In the Product Details area, enter the name of the product and its ID
number, if you have it. In the Sale Details area, enter the price of the product. If you are
selling multiple identical products, change the quantity to the
reflect the quantity you are going to sell. If you are selling two
toy trucks for the same price of $15 each, enter $15 and change the
quantity to 2. You will see the Total Payment update to $30.  |
The Payment Wizard does not support multiple products. If you are
collecting payment for more than one product, you will have to
summarize the products in the Name field and enter a quantity of 1.
See the next section of this hack for another solution.
|
|
In the S&H field, enter the amount to charge for shipping and
handling. If you change this field, you will see the Total Payment
update to reflect the new amount. Select the currency, confirm that the Total Payment is correct, and
click Next when you're done. On the Button screen, select the button you would like to put into
your email. The wizard provides six payment button images, all hosted
on the PayPal web site (they might not appear if you or your
recipient are not connected to the Internet). If you would like to use another image for your button, select the
URL option and enter the URL of your image file (presumably hosted on
your own site). The button must be on a web server that can be
accessed by anyone via the Internet. You can also choose the Text
option to put the PayPal payment URL behind a text link instead of an
image. Click Next to view the You're Almost Done screen,
where you'll see a summary of the values selected
for your Payment Button. Verify that the information is correct and
press the Test button to see the button in action. If you are planning on sending many similar buttons, check the Save
settings box. The wizard will save your settings for the next time. Click Insert, and the fully configured button will be inserted into a
blank email. (You won't be able to click on the
button, because you're in edit mode.) At this point, complete the email. Type one or more email addresses
into the To field, enter a subject, and include a note or
instructions to accompany the button, as illustrated in Figure 4-9.

Click Send when you're finished.
When your customer opens the email, he will be able to click the
button and pay you after logging into his PayPal account. To test
this experience firsthand, send the email to your own email address.
4.12.3 Including More than One Button in an Email
Since the PayPal Payment Wizard creates a new email message with each
button, there is no way to use it to insert more than one button into
a single email message. However, overcoming this limitation is easy
enough:
Insert a payment button with the Payment Wizard, as described in the
previous section. Using your mouse, select the area around the new button, making sure
to include the lines above and below the new button, as shown in
Figure 4-10.

 |
If you select only the button and not the lines above and below,
you'll get only the image without the hyperlink.
|
|
Copy the selection to the clipboard by pressing Ctrl-C or by
selecting Copy from Outlook's Edit menu. Click to place the insertion point (text cursor) where
you'd like the new button to appear, and paste the
button into the existing email by pressing Ctrl-V or by selecting
Paste from Outlook's Edit menu. You can paste the
button into any email, including one that already contains a payment
button.
Repeat the process for each additional payment button you would like
to insert. To verify that the image and corresponding hyperlink have
been pasted correctly, as well as to make any changes to the URL,
right-click the button and select Properties.
|
Main Menu
|