Guest Post By Tanmay Das
Many times I have read about a alertpay donate button. you know those button where the users can donate small amount 2 the site. But finding 1 is really tough. Paypal™ has a donate button, but you can donate only if you have a Paypal™ account. But everyone doesn't has a Paypal™ account.
So the other option is 2 allow people to use their credit-cards to donate. But to enable this feature you have to pay an excess of 20-25%. Now that is a real rip off.
Another option is Alertpay™, they allow credit-card transaction 4 free after a simple site verification. But the problem is they don't have a ready made donate button. So the option is to use a buy button as a donate button.
But now the problem is that the amount 4 a buy button is fixed (as you don't want the user to decide the amount for a purchase), but in case of a donation the user wishes to select the amount to donate.
Now I searched the net 4 sometime & finally found a code which allows the user to change the amount to donate as per their wish. But it had some problem, just a glitch as you can add any text in the text box. Now that is silly as no one would enter alphabet in that text box but Y take the risk so I found a script & modified the code so that only positive integers can B entered in the text box.
So here is the code:
<html><head>
<!-- Code written by someone else but the whole thing is made by Tanmay Das -->
<script language="JavaScript">
function checkIt(evt) {
evt = (evt) ? evt : window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
status = "This field accepts numbers only."
return false
}
status = ""
return true
}
</script></head><body>
Enter Donation Amount:
<form method="post" action="https://www.alertpay.com/PayProcess.aspx">
<input type="hidden" name="ap_purchasetype" value="item-goods">
<input type="hidden" name="ap_merchant" value="jamshed11946@gmail.com">
<input type="hidden" name="ap_itemname" value="Donate">
<input type="hidden" name="ap_returnurl" value="Thank you page">
<input type="hidden" name="ap_quantity" value="1">
<input type="hidden" name="ap_description" value="Your each penny will keep us to continue">
<input type="text" name="ap_amount" value="" onKeyPress="return checkIt(event)">
<select name="ap_currency">
<option value="AUD">AUD</option>
<option value="BGN">BGN</option>
<option value="CAD">CAD</option>
<option value="CHF">CHF</option>
<option value="CZK">CZK</option>
<option value="DKK">DKK</option>
<option value="EEK">EEK</option>
<option value="EUR">EUR</option>
<option value="GBP">GBP</option>
<option value="HKD">HKD</option>
<option value="HUF">HUF</option>
<option value="LTL">LTL</option>
<option value="MYR">MYR</option>
<option value="NOK">NOK</option>
<option value="NZD">NZD</option>
<option value="PLN">PLN</option>
<option value="RON">RON</option>
<option value="SEK">SEK</option>
<option value="SGD">SGD</option>
<option value="USD" selected="selected">USD</option>
<option value="ZAR">ZAR</option>
</select>
<input type="hidden" name="ap_cancelurl" value="your cancelation url">
<input type="image" name="ap_image" src="donate.gif">
</form>
</body>
</html>
Update: You have to change all the things that are bold and red colored. However you can download a beautiful donate button Here
How to add Alertpay Donate Button...
ReplyDeleteI will guide you to add an alertpay donate button to your website. This will lead your visitors to buy you a bear....
Thanks alot for this trick. I used on my site for my Donation button.
ReplyDeletevery nice post sir
ReplyDeletei have a question
i am a newbie and i don't know how to put this can you plz create another post showing step by step,how can i put it in my blog.
does it work with both blogger or wordpress,or just one.
thank you
Nice, thanks, do you have a way for Paypal too, where my users can put their own payment, because Paypal doens't offer put a number like Alertpay.
ReplyDeleteThanks for the nice code, it nice to see a person who shares his knowledge to others... keep it up.
ReplyDelete