# 集成新的 Stripe Checkout 或 Stripe Payment Intents 版本？

**URL:** <https://meta.discourse.org/t/integrating-with-new-stripe-checkout-or-stripe-payment-intents-version/122818>\
**Category:** Development\
**Created:** [2019 年7 月 12 日 17:48 UTC](https://meta.discourse.org/t/integrating-with-new-stripe-checkout-or-stripe-payment-intents-version/122818 "2019-07-12T17:48:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
发布日期： [2019 年7 月 12 日 17:48 UTC](https://meta.discourse.org/t/integrating-with-new-stripe-checkout-or-stripe-payment-intents-version/122818/1 "2019-07-12T17:48:54Z")

</div>

我使用自己编写的 [Discourse 插件](https://github.com/chrisbeach/discourse-paid-pinning) 来为论坛变现，该插件通过 Stripe Checkout（版本 1）接受付款。

这很简单，因为 Stripe 在（JavaScript）客户端处理了整个付款流程，并在付款成功/失败时触发单个回调。

随着 [新的欧盟法规即将实施](https://stripe.com/docs/strong-customer-authentication)，Stripe 现在强制要求使用其 Checkout 版本 2 实现，即“支付意图（Payment Intents）”，过渡截止日期为 2019 年 9 月。

这带来了问题，因为（据我所知），这两个 API 都采用了更复杂的工作流程，需要消费者轮询其 API 以等待付款完成，或使用网络钩子（web-hooks）。

我对更改插件感到非常担忧，原因如下：

- 我并不是很有经验的 Ruby/Ember 开发者（我的代码大部分是从一个 [现有插件](https://github.com/choiceaustralia/discourse-donations) 中借鉴而来的）
- 我不确定 Discourse 插件 API 是否提供了适合实现此类轮询的机制（最终结果至关重要）

是否有人有以下经验：a) 将 Stripe V2 Checkout 或 Payment Intents 集成到 Discourse 中，或 b) 通过 Discourse 插件处理服务器轮询？

提前感谢 👍

---

_[View the full topic](https://meta.discourse.org/t/integrating-with-new-stripe-checkout-or-stripe-payment-intents-version/122818)._
