80 以外的端口上的 PayPal IPN

发布于 2024-09-01 19:20:11 字数 220 浏览 3 评论 0原文

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

我试图指定一个类似 http://domain.com:8080/url/ 的 URL to/ipn.php 但 IPN 请求未通过。

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

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪是无色的血 2024-09-08 19:20:12

经过多次测试,我能够确认 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

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
浮云落日 2024-09-08 19:20:12

如果您有可以通过 ssh 访问的 nginx 服务器,那么您可以执行以下操作:

启动 ssh 反向代理:

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

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

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;
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文