Flutter + Firebase + 条纹

Flutter + firebase + stripe

我是一个关于 stripe 及其在 flutter 应用程序中的集成的新手。

我正在为我的后端使用 firebase(实际上并不复杂,只是一些事件函数),正如我所说,我的应用程序使用 flutter(对于 android 和 iOS)并且我是完全不知道如何进行。

我找到了一个 firebase 插件 (https://firebase.google.com/products/extensions/stripe-firestore-stripe-payments) and also a library for flutter for stripe (https://pub.dev/packages/flutter_stripe) 但我不确定我是否必须使用其中一个而自己完成另一部分,如果使用一个与另一个是多余的或者如果我应该同时使用两者并将它们集成在一起。

额外信息:每月付款一次(不是订阅,每个月的金额不同),并将存储在 firestore 集合中。

所以...任何清晰的资源或文档将不胜感激!

Firebase 的 Stripe Extensions 基于 Cloud Functions 和 Firestore。这意味着要使用 Stripe 启动操作,您需要向 Firestore 中的文档写入一些内容,而要获得响应或响应 Stripe 上的事件,您需要从 Firestore 中监听 to/read。

有客户端SDK for this extension for JavaScript, but not for other platforms/languages yet. To learn how to interact with Stripe through the Extension on other platforms, consider starting with this codelab, which covers use-cases such as reading product and pricing data and render it to the page, creating a subscription for your customer, and showing the active subscription once created

从您链接的文档页面可以看到它 recommended usage:

If you're building on the web platform, you can use this extension for any of your payment use cases.

If you're developing native mobile applications and you're selling digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. See Apple's and Google's guidelines for more information.

For all other scenarios you can use the stripe-android, stripe-ios, stripe-react-native, or flutter_stripe SDKs.

所以最后一行链接到您还提到的 flutter_stripe SDK,并建议将其用于 Stripe Extension for Firebase 不满足的用例。