In my community I accept donations using the NFO donations system and give donor benefits on my game servers.
The script will check to make sure they actually entered something in the steam id box, and will automatically put it in the notes section.
also make sure you edit line 51 where it says YOUREMAIL@EMAIL.COM with the e-mail address of your NFO account!
Code: Select all
<!--Written by NineteenEleven for Kablowsion Inc.-->
<!DOCTYPE html>
<html>
<head>
<!-- Add jQuery -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
<!-- Add jQuery UI -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"></script>
<!-- CSS for the tooltip -->
<style type="text/css">
.ui-tooltip {
padding: 8px;
position: absolute;
font-size: 15px;
border-radius: 15px;
background-color: rgba(82, 90, 87, 0.2);
border: 1px solid black;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
#steamid-info{
font-size: 10px;
text-decoration: none;
border-bottom: 1px dotted;
}
</style>
</head>
<body>
<center>
<img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Donate using PayPal" id='button'></a>
<br>
<br>
Amount: $<input type="text" name="paypalamount" size="5" class="inputbox" value="5">
<br>
Steam ID:<input type="text" name="paypaloption1" value="STEAM_0:X:XXXXXX" id='id-box' title="Please enter your SteamID">
<br />
<a href="http://steamidfinder.com/" id='steamid-info' target='_blank'> Where do I find my Steam ID?</a>
</center>
<script type="text/javascript">
$(document).ready(function() {
$('#button').click(function(){
var donateAmount = $('input[name=paypalamount]').val();
var steamId = $('input[name=paypaloption1]').val();
var steamDefault = "STEAM_0:X:XXXXXX";
if(steamId === steamDefault){alert("If you would like donor benefits please enter a vaild Steam ID, If you are donating out of the kindness of your heart, just clear out the Steam ID field.");}
else{
window.location='https://www.nfoservers.com/donate.pl?force_recipient=1&recipient=YOUREMAIL@EMAIL.COM&force_amt=1&amt='+ donateAmount + '&force_note=1¬e=' + steamId;}
});
$("#id-box").tooltip({
show: {effect: "slideDown",delay: 250}
});
});
</script>
</body>
</html>