An Easy way to Drop PayPal's Donate feature into your xhtml

Wednesday, 23 January 2008 17:45 by joelevi

Since I first added a donate button to my web site long ago, I've gotten a total of $0 in donations -- that's right, zilch.

Not one to be easily discouraged, I found an even easier way. With this code (and a valid Paypal's account) you can make ANY link (graphical or textual) into a donation link! Wahoo!

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=Joe%40JoeLevi%2ecom&item_name=www%2eJoeLevi%2ecom&amount=&no_shipping=0&no_note=1&tax=0&currency_code=&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8

Let's break that down:

  • "item_name=www%2eJoeLevi%2ecom" is the escaped line item for the invoice, in this case "www.JoeLevi.com"
  • "business=Joe%40JoeLevi%2ecom" is your Paypal's account's registered email address (again, escaped)
  • "currency_code=" is the two letter (caps) currency code (US for US, which I think is the default, I left the value blank in the hopes that it would default to the Paypal's user's default currency, but I'll need someone to verify this for me)
  • "amount=" is the amount of money to be donated (I left mine blank, so Paypal's will ask you for the amount to be donated)

That's it. You can get more fancy by using a form where the user can customize their amount and currency, but for this post, it's just a link.

You can thank me later.


If you liked this post, please be sure to subscribe to my RSS Feed.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , , ,
Categories:   Web Technology
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Comments are closed