【发布时间】:2020-09-22 14:35:27
【问题描述】:
我无法使用我的 Laravel / React 应用程序连接到 Stripe。在本地它可以工作,而 Digital Ocean 液滴上的相同代码则不能。我收到这条消息:
Could not connect to Stripe (https://api.stripe.com/v1/invoices/upcoming?customer=cus_XXXXXXXXXX). Please check your internet connection and try again. If this problem persists, you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support@stripe.com. (Network error [errno 7]: )
这是来自 Laravel 的错误消息。重要的部分是(Network error [errno 7]: )。与遇到此错误的CURL有关:CURLE_COULDNT_CONNECT (error code 7)。
我也期待像(Network error [errno 7]: Failed connect to api.stripe.com:443; Operation now in progress) 这样的东西。冒号后不能有空格。
我试过这个:
- 服务器使用 SSL (https://xxxxx.xxx)
- 重启服务器
- 重新部署应用程序
- 清除配置、路由、视图等缓存
- php 工匠优化:清除
- 重新运行作曲家
- 检查了我的 Stripe API 密钥
- 尝试手动将 shell 与 curl 连接,并且可以正常工作。
- 试过https://github.com/stripe/stripe-reachability#stripe-reachability
供参考,您可以在https://curl.haxx.se/libcurl/c/libcurl-errors.html 上看到错误,并表示:
CURLE_COULDNT_CONNECT (7) - Failed to connect() to host or proxy.
【问题讨论】:
-
你的网站使用 https 吗?
-
是的,它使用 HTTPS
标签: laravel