【问题标题】:PayPal IPN on port other than 80PayPal IPN 在 80 以外的端口上
【发布时间】:2011-02-19 19:10:50
【问题描述】:

有人试过在 80 以外的端口上使用 Paypal 的 IPN 吗?

我正在尝试指定像 http://domain.com:8080/url/to/ipn.php 这样的 URL,但 IPN 请求没有通过。

如果我直接从浏览器中点击 URL,它就可以正常工作。

【问题讨论】:

    标签: php paypal paypal-ipn


    【解决方案1】:

    经过多次测试,我能够确认 PayPal 的通知 URL/notify_url 不能包含非标准端口号。

    这些网址可以使用:

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

    这些不起作用:

    http://my.website.com:81/ipnpage.aspx
    https://my.website.com:82/ipnpage.aspx
    

    【讨论】:

    • 作为错误提交。感谢您提交您的问题。使用此参考号进行跟进:#130124-000237
    • 这还有问题吗?我似乎无法在非标准端口上获得 IPN。我觉得为什么存在这个限制很令人困惑。
    • @Ed:限制仍然存在。
    • @EdGruberman 虽然很烦人,但我的猜测是 PayPal 不想在他们的传出防火墙中制造比严格需要的漏洞更多的漏洞。如果他们取消了这个限制,除非他们自己指定了一个备用端口,否则他们将不得不允许任何端口上的传出流量,而他们的安全人员会非常正确地对此不满意。我不能确定我是对的,因为我与 PayPal 没有任何关系,但这是我的最佳猜测。
    • 2016,这个限制仍然存在。
    【解决方案2】:

    如果你有 nginx 服务器可以通过 ssh 访问它,那么你可以这样做:

    启动ssh反向代理:

    ssh -Nvv -o TCPKeepAlive=yes -R 3000:localhost:3000 username@your-server.com
    

    添加 nginx 配置以代理 80 端口上的 3000 端口:

    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;
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2012-02-12
      • 2023-03-28
      • 2023-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-21
      • 2015-04-15
      • 2019-09-15
      相关资源
      最近更新 更多