2012-07-04

PayPal Instant Payment Notification (IPN) Simulator Requires Port 80

Someone please correct me if I'm wrong, but I fought for an hour or more trying to get PayPal's Instant Payment Notification (IPN) Simulator to post test transactions to my test site running on IIS Express which listens on a port different than 80; and it just doesn't work.

I asked friends on external networks to bring my site up in their browsers and they could hit it fine on the non-standard port, so I knew my firewall and IIS Express were configured correctly.

I cannot find anywhere in PayPal's documentation where it states that port 80 is required but it seems their own firewall is pretty strict with outbound traffic.  Once I forced my router to listen on port 80, and forward the request to the non-standard port my site listens on, the simulator worked like a champ.

So, if you're having problems with the IPN simulator not sending to your listener and you are listening on a non-standard port, make sure to do one of the following:

  1. Force your test site to listen on port 80 and configure your firewall accordingly.
  2. Force your router to listen on port 80, but forward to the port your test site is set up on.
That's what we like to see!
As a side note, if I remember correctly... the standard ASP.NET Development Server (Cassini) that comes with Visual Studio, does not accept requests from an external network.  I believe it can only accept them from the same machine you are doing the development on.  This is why I opted to use IIS Express.

Hope this saves someone else some time and head-banging on your desk.  :)
Happy coding!