danielrvt
danielrvt

Reputation: 10906

PayPal IPN not calling notify_url

So I have this form in my Wordpress site and I've configured it to use the PayPal sandbox:

<form action="https://sandbox.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="business" value="[email protected]">
  <input type="hidden" name="item_name" value="Test - 11/11/2017">
  <input type="hidden" name="item_number" value="13877">
  <input type="hidden" name="notify_url"  value="http://b1248fa5.ngrok.io/wp-admin/admin-ajax.php?action=eab_paypal_ipn&amp;blog_id=1&amp;booking_id=1">
  <input type="hidden" name="amount" value="5">
  <input type="hidden" name="return" value="http://b1248fa5.ngrok.io/events/2017/11/test/">
  <input type="hidden" name="currency_code" value="EUR">
  <input type="hidden" name="no_shipping" value="1">
  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="quantity" value="1" max="1">
  <p>Haz click aquí para pagar tu entrada</p><input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_paynow_SM.gif" alt="PayPal - The safer, easier way to pay online">
  <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif">
</form>

It is generated by the Event + plugin. I has been working fine all year round until now.

This is what is happening:

  1. I submit the form.
  2. I get to my sandbox account's login page. I login.
  3. My sandbox account's dashboard opens up.
  4. Nothing happens... I'm waiting for PayPal to call my notify_url handler, but it doesn't!

If I use the PayPal IPN simulator with the same notify_url, then it is a whole other story. I get a message saying:

IPN was not sent, and the handshake was not verified. Please review your information.

However, in this case, my notify_url does get called.

What could be going on here? Why PayPal is not calling my notify_url when I submit my form?

Upvotes: 0

Views: 679

Answers (1)

Drew Angell
Drew Angell

Reputation: 26036

The IPN will not be triggered until a transaction is completed. It sounds like you're not fully completing the transaction before expecting to see it hit..??

If you are completing the transaction and you aren't getting what you expect then you need to check the IPN History in the PayPal account to see if it's showing that IPNs are being sent and what the response is on them. Based on what you see there you'll go one direction or another.

If it looks like it's sending things fine, then you'll need to check the web server logs to see what's happening when your IPN URL gets hit. There must be an error happening.

For more details take a look at my article on how to test PayPal IPN.

Upvotes: 0

Related Questions