user3096760
user3096760

Reputation: 15

Paypal IPN won't work?

I have been trying to make a working ipn for my website. Here's the code: Have tested this through real PayPal.

My Button:

<form method="post" name="paypalConfirm" action="http://www.paypal.com/cgi-bin/webscr"> 
<input type="hidden" name="rm" value="2"/> 
<input type="hidden" name="cmd" value="_xclick"/> 
<input type="hidden" name="custom" value="username"> 
<input type="hidden" name="business" value="email"/> 
<input type="hidden" name="item_name" value="Item"/> 
<input type="hidden" name="amount" value="0.02"/>
<input type="image" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">

I have tested these several times but it just won't work. If anybody could help me, please do.

Upvotes: 0

Views: 98

Answers (1)

Drew Angell
Drew Angell

Reputation: 26056

You need to make sure you have IPN configured in the PayPal account that is receiving the payment.

If you do have it configured and you don't think you're getting an IPN check the IPN History in your PayPal account. This will show you whether or not anything is getting sent and what response your server is sending back. It's possible the IPN's are getting sent but your script is simply failing.

You'll need to check your web server logs to see what the error is if that's the case, or what I like to do is setup a basic HTML form with the action set to my IPN URL. I include hidden fields that match what I expect to get from an IPN, and then I load this in a browser and submit it. This allows me to see the result on screen which helps with debugging. Once it's all working there you know it'll work when PayPal sends it.

Keep in mind if testing that way the IPN will not verify with PayPal since the data didn't come from them, so you'll need to make sure your code logic handles that accordingly.

Upvotes: 1

Related Questions