Stripe Connect:付款意向 client_secret 错误

Stripe Connect: Payment Intent client_secret error

我正在尝试将 flutter_stripe 用于 stripe 连接帐户,不幸的是我总是遇到同样的错误:提供的 client_secret 与关联的 client_secret 不匹配PaymentIntend.

我检查了我的前端和后端是否发送和接收相同,所以这应该不是问题,任何 thoughts/ideas?

不知道是否重要,但我通过设置意图使用了欧盟测试车(效果非常好)。

如果需要,我也可以添加一些代码,但我目前不确定什么有用什么没用。

编辑: 可以找到代码示例 here

使用 Stripe Connect,请务必记住您必须执行以下操作:

  • 使用平台的密钥实例化您的 server-side Stripe 库,并在 Stripe-Account header [0] 中传递 Connect 帐户的 ID。

  • 使用平台的可发布密钥实例化您的移动 Stripe 库,并在 Stripe-Account header Stripe-Account header 中传递 Connect 帐户的 ID [1].

您的 server-side 或 mobile-side 代码缺少 Stripe 帐户 header,因此您需要修复它。我不知道是哪一个,因为你没有分享任何代码。

[0] https://stripe.com/docs/connect/authentication#stripe-account-header

[1] https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application