Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PayPal IPN on port other than 80

Has anybody tried using Paypal's IPN on a port other than 80?

I'm trying to specify a URL like http://domain.com:8080/url/to/ipn.php but the IPN request isn't getting through.

If I hit the URL directly from my browser it works fine.

like image 355
Ian McIntyre Silber Avatar asked May 15 '10 03:05

Ian McIntyre Silber


2 Answers

After doing multiple tests I was able to confirm that PayPal's Notification URL/notify_url can not contain a non-standard port number.

These urls will work:

http://my.website.com:80/ipnpage.aspx
https://my.website.com:443/ipnpage.aspx

These will not work:

http://my.website.com:81/ipnpage.aspx
https://my.website.com:82/ipnpage.aspx
like image 113
Mark Avatar answered Nov 04 '22 12:11

Mark


If you have nginx server with possibility to access to it by ssh, then you can do:

Start ssh reverse proxy:

ssh -Nvv -o TCPKeepAlive=yes -R 3000:localhost:3000 [email protected]

Add nginx config to proxy a port 3000 on port 80:

server {
    listen       80;
    server_name  your-app.your-server.com;

    location / {
      proxy_pass          http://localhost:3000;
      proxy_set_header    Host             $host;
      proxy_set_header    X-Real-IP        $remote_addr;
      proxy_set_header    X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_set_header    X-Client-Verify  SUCCESS;
      proxy_read_timeout 1800;
      proxy_connect_timeout 1800;
    }
}
like image 5
Dmitry Polushkin Avatar answered Nov 04 '22 11:11

Dmitry Polushkin