|
|
|
Rank: Starting Member
Groups: Registered
Joined: 7/31/2005 Posts: 1 Location: ,
|
Hello everyone, I searched the forum but can't find any helpful information on this topic. I have seen modifications for PHPNuke and stuff but I need some straight up PHP. I know basic PHP but if given the code I can figure it out, or even if somebody can show me to a tutorial, because I have looked everywhere and can't find it. Anyways, I would like a script that uses IPN so that when somebody donates, once the process is Verified, it stores the Donors Name, Donation Amount, etc.. in my MySQL database. I know how to display the information from my database so I can do that. If anybody can help that would be great.
Regards,
Bryan.
www.sloaner.net - Your Source for Humorous Media
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/15/2006 Posts: 3 Location: ,
|
yeah i would also like to get this code. please help...i r noob!
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/15/2006 Posts: 3 Location: ,
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/11/2006 Posts: 2 Location: ,
|
trying to do the same here.
what I did:
added hidden field to the form,like this
<input name="custom" value="<? echo $uid; ?>" type="hidden">
the code to get the $uid (userid): <? if (pnUserLoggedIn()) { $uid = pnSessionGetVar('uid'); } else { $uid = 0;} ?>
if (pnUserLoggedIn()) is how I get the userid in my setup. you'll have to write code that gets the logged in user's id# or username,depending on your setup and replace accordingly.
I wrote: else { $uid = 0;} // this is for guests (hey you never know, a guest might just donate :P )
so... now my form looks like this: ************************************ <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="email@domain.com"> <input type="hidden" name="item_name" value="Donation"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://domain.com/thank_you.html"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="hidden" name="bn" value="PP-DonationsBF"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt=" alt="Donate with PayPal"> <input name="notify_url" value="http://domain.com/donate/notify.php" type="hidden"> <? if (pnUserLoggedIn()) { $uid = pnSessionGetVar('uid'); } else { $uid = 0;} ?> <input name="custom" value="<? echo $uid; ?>" type="hidden"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> *********************************************************
in notify.php I added:
$uid = $_POST["custom"]; $amount = $_POST['mc_gross'];
if ($uid == 0) { $uname = "Guest"; } else {
$dbconn(); //connect to db
$result = mysql_query("SELECT uname FROM users WHERE uid = $uid"); $uname = mysql_result($result,0); }
// this is my setup @ database $sql = "INSERT INTO data (uid, username, amount, date) VALUES ('$uid', '$uname', '$amount', NOW())"; mysql_query($sql) or die('Error, insert query failed')
mysql_close($db);
************************************
then you write you code to display user,donation etc.
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 2/23/2008 Posts: 13 Location: ,
|
You can find a really good paypal donation meter at http://www.PayPalDonationMeter.comMultiple donation meters can be used on the same site, you can have multiple donation reasons and display how much collected for all or for each individual one, you can also collect and show a name of each donator and display the last x numbr of donors More updates coming soon, there will be multiple new image packs coming out so you can have different donation meter display images and much more PayPal Donation Meter - http://www.PayPalDonationMeter.comThere is also a new hosted version of the with simple easy to add code so you do not have to host and install the itself on your site and do not need php or mysql to run the as we do all that for you our end. Hosted PayPal Donatione Meter - http://www.PayPalDonatio...osted-donation-meter.php
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 6/1/2006 Posts: 194 Location: ,
|
Take a look at http://www.stellarwebsol.../products.php#donations
Tyler Stellar Web Solutions - e-Solutions for e-Commerce Secure Payment, Ordering, Shipping, Electronic Goods Delivery http://www.stellarwebsolutions.com/ Track PayPal Donations Live http://www.stellarwebsolutions.com/en/products.php
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.431 seconds.