YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Return Data from a Donation. Options
chriskona
#1 Posted : Friday, March 12, 2004 5:44:19 PM
Rank: Starting Member

Groups: Registered

Joined: 3/12/2004
Posts: 1
Location: ,
I have a donation button on my site, and after a donation is made, paypal does not post anything back like IPN claims. Here is my code, and please let me know what im doing wrong. Here is my HTML Code. <center> <form ACTION="https://www.paypal.com/cgi-bin/webscr" METHOD="POST" id="form1" name="form1"> <input TYPE="hidden" NAME="cmd" VALUE="_xclick"> <input TYPE="hidden" NAME="business" VALUE="paypal@mydomain.com"> <input TYPE="hidden" NAME="return" VALUE="http://www.mydomain.com/paypal.php"> <input TYPE="hidden" NAME="item_name" VALUE="Donation to AutoRush.com"> <input TYPE="hidden" NAME="item_number" VALUE="AutoRush_DONATE"> <input TYPE="hidden" NAME="cancel_return" VALUE="http://www.mydomain.com"> <input TYPE="image" SRC="http://images.paypal.com/images/x-click-but04.gif" BORDER="0" NAME="submit" ALT="Donate to AutoRush with Pa yPal - it's fast, free and secure!"> </form></center> Here is paypal.php $get=$_POST['amount']; $payment_amount = $_POST['mc_gross']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $message_part1 = "receiver_email = $receiver_email\npayer_email = $payer_email\nfirst_name = $first_name\nlast_name= $last_name\nget = $get\npayment_amount = $payment_amount\n\n"; // this is debug to get any POST data and email me it. while (list($key, $value) = each ($_POST)) { $a .= "$key - $value\n"; } $message_part2 = "This is an Array\n\n$a"; $message = "".$message_part1." \n\n ".$message_part2."\n"; mail("chris@jynx.net","Donation.","$message"); dbconnect(); $insert="insert into donate values(NULL,'$payment_amount','$first_name','$last_name')"; $add_FUNDS=mysql_db_query("$db",$insert); mysql_close($dbconnect); if($add_FUNDS){ echo "<BR><BR>$font<center>Thank you, $first_name $last_name for your donation.!!</center><BR>"; } else { echo "$font <BR><BR>ERROR From paypal. This does not mean your donation didnt go though, it just means I had an error trying to insert your information into my database."; } Thank you- chris
Sponsor  
 
PayPal_Paulam
#2 Posted : Wednesday, March 17, 2004 3:51:53 PM
Rank: Starting Member

Groups: Registered

Joined: 11/21/2003
Posts: 511
Location: ,
Hi chriskona,

Is that the complete code that you have for IPN?. Because based on that code you are not using IPN. For IPN sample code visit www.paypal.com/ipn.

Now, if you just using the return url to retrieve the information then you are missing one variable on your HTML code. You need to have 'rm' set to 2. For more information on how 'rm' variable works go to https://www.paypal.com/en_US/pdf/single_item.pdf page 37.

Paulam
PayPal Tech Support Agent
PayPal an eBay company
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.209 seconds.