Reputation: 399
I'm having difficulties with Paypal IPN. I have set up a Buy Button that links back to a script (ipn.php inevitably) and to test that it is working, the only code in it is as follows:
$from = "Guide Test Page";
$to = "[email protected]";
$subject = "VERIFIED IPN";
$message = "Post: ".serialize($_POST)."<br>";
$headers = "From:" . $from;
mail($to, $subject, $message, $headers);
echo "Mail Sent";
So it sends me an email, hopefully with all the Paypal Post variables. What happens when I go through a 'Buy' is that the redirect to ipn.php works, I see the text 'Mail Sent' on screen and the email arrives. However, serialise($_POST) produces a:0:{}
Can anyone suggest what is going on?
Upvotes: 0
Views: 122
Reputation: 186
I wouldn't think you'd see "Mail Sent" on your screen at all, since the IPN script would be called (independently) by PayPal at some point after you submit the transaction (could be instant, could be a few-many seconds). Are you perhaps using that IPN.PHP as your return URL?
Upvotes: 1