PayPal IPN on port other than 80

后端 未结 2 1436
闹比i
闹比i 2020-12-06 16:54

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 ge

相关标签:
2条回答
  • 2020-12-06 17:19

    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
    
    0 讨论(0)
  • 2020-12-06 17:22

    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 username@your-server.com
    

    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;
        }
    }
    
    0 讨论(0)
提交回复
热议问题