Laravel 无法连接到 Stripe

Cud*_*dos 5 laravel

我在使用 Laravel / React 应用程序连接到 Stripe 时遇到问题。在本地它可以工作,而在 Digital Ocean Droplet 上的相同代码却不能。我收到这条消息:

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]: )
Run Code Online (Sandbox Code Playgroud)

这是来自 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)。冒号后不能有空格。

我已经尝试过这个:

作为参考,您可以在https://curl.haxx.se/libcurl/c/libcurl-errors.html上看到错误,其含义是:

CURLE_COULDNT_CONNECT (7) - Failed to connect() to host or proxy.
Run Code Online (Sandbox Code Playgroud)

Abd*_*san 3

这不是代码中的问题,您可能需要检查您的服务器托管提供商。

顺便说一句,您可能需要看看这个答案。一样的。他通过更换服务器解决了这个问题,在与主机提供商沟通时,发现该端口因流量大而被阻塞。