【问题标题】:Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 26])与 Stripe 通信时出现意外错误。如果此问题仍然存在,请通过 support@stripe.com 告知我们。 (网络错误 [errno 26])
【发布时间】:2020-08-30 12:34:44
【问题描述】:

我正在开发 xampp,Windows 10

$account = \Stripe\Account::create([
            'country' => 'US',
            'type' => 'custom',
            'requested_capabilities' => ['card_payments', 'transfers'],
          ]);
         $file = \Stripe\File::create([
            'purpose' => 'identity_document',
            'file' => fopen('../images/3.jpg', 'r'),
          ], [
            'stripe_account' => 'acct_xxx',
          ]);
          $verification = \Stripe\Account::update(
            'acct_xxxxx',
            [
              'company' => [
                'verification' => [
                  'document' => [
                    'front' => $file->id,
                  ],
                ],
              ],
            ]
          );

运行时出现以下错误:

与 Stripe 通信时出现意外错误。如果此问题仍然存在,请通过 support@stripe.com 告知我们。 (网络错误[errno 26]:)

我尝试更新 TLS 版本,我取消选中 1.0 和 1.0,只启用 1.2,但没有帮助。

【问题讨论】:

  • 错误消息建议您联系 Stripe 支持。你有吗?
  • 在此之前是否有更多代码可以帮助我们帮助您? (无论是直接还是通过 require/include 语句)。例如,您是否启动了 Stripe 并传递了您的密钥?
  • @ed2 是的,但是这个身份证明文件只是错误返回

标签: php stripe-payments


【解决方案1】:

您应该在同一台机器上运行 Stripe reachability tool,以确保您能够与 API 通信。

如果这是间歇性错误,您也可以配置automatic retries,但在这种情况下建议使用idempotency keys。

【讨论】:

  • 可达性工具返回的是 OK 报告,不是间歇性错误。
猜你喜欢
  • 1970-01-01
  • 2013-07-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-02-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多