Enabling multiple PayPal "forms" on a Community Server page

I see this question from time to time, where someone wants to provide several PayPal buttons on a Community Server page.  This is actually a .NET issue, since each PayPal button is contained in a separate form, and only one form is supported on a .NET page, but Community Server is .NET (at its best – wink! wink!) so there it is.

As I said, each button is in actuality a form.  What we want to do is to take the form and convert it into a url.  Textpad is great for this, where we take each “name” input item and make it a querystring item.  Form on top, our url (which does exactly the same thing) is below.

 

 <form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
         <input type=”hidden” name=”cmd” value=”_xclick” />
         <input type=”hidden” name=”bn” value=”webassist.dreamweaver.4_5_0″ />
         <input type=”hidden” name=”business” value=”me@DBVT.com” />
         <input type=”hidden” name=”item_name” value=”Premium Membership, DBVT.com; 2 year subscription rate.” />
         <input type=”hidden” name=”item_number” value=”PM2″ />
         <input type=”hidden” name=”amount” value=”85.00″ />
         <input type=”hidden” name=”currency_code” value=”USD” />
         <input type=”hidden” name=”return” value=”
http://DBVT.com/user/CreateUser.aspx?ReturnUrl=” />
         <input type=”hidden” name=”cancel_return”  value=”
http://DBVT.com/user/CreateUser.aspx?ReturnUrl=” />
         <input type=”hidden” name=”undefined_quantity” value=”0″ />
         <input type=”hidden” name=”receiver_email” value=”payments@DBVT.com” />
         <input type=”hidden” name=”mrb” value=”R-3W123445670XBOGUS” />
         <input type=”hidden” name=”pal” value=”ANN123446789BOGUS” />
         <input type=”hidden” name=”no_shipping” value=”1″ />
         <input type=”hidden” name=”no_note” value=”0″ />
         <input type=”image” name=”submit” src=
http://DBVT.com/images/misc.images/paypal-2year.gif
         border=”0″  width=”125″  height=”80″ alt=”Thanks for your support!” />
</form>

 
becomes...
 

<area shape=”rect” coords=”512,894,687,934″ href=”https://www.paypal.com/cgi-bin/webscr?
cmd=_xclick&amp;bn=webassist.dreamweaver.4_5_0&amp;business=me@dbvt.com&amp;
item_name=Premium
Membership, DBVT.com; 2 year subscription
rate.&amp;item_number=PM2&amp;amount=85.00&amp;currency_code=USD
&amp;return=
http://dbvt.com/user/CreateUser.aspx?
ReturnUrl=&amp;cancel_return=http://dbvt.com/user/CreateUser.aspx?
ReturnUrl=&amp;undefined_quantity=0&amp;receiver_email=me@dbvt.com&amp;mrb=R-
3W123445670XBOGUS&amp;pal=ANN123446789BOGUS&amp;no_shipping=1&amp;no_note=0″

target=”_top” alt=”2-Yr Subscription” />

 

 

Article written by

A long time developer, I was an early adopter of Linux in the mid-90's for a few years until I entered corporate environments and worked with Microsoft technologies like ASP, then .NET. In 2008 I released Sueetie, an Online Community Platform built in .NET. In late 2012 I returned to my Linux roots and locked in on Java development. Much of my work is available on GitHub.