是否可以将Firebase的条纹集成用于iOS应用程序?

问题描述:

Firebase发布了与Stripe的集成,以便您不必构建自己的服务器基础结构。它可以在这里找到:https://firebase.google.com/docs/use-cases/payments#what_to_do_with_the_sample_app是否可以将Firebase的条纹集成用于iOS应用程序?

该网页明确指出,您可以处理网络应用程序的付款。但是如果我正在构建一个iOS应用程序,我还可以继续使用这种集成吗?如果是这样,我该怎么做呢?

谢谢,提前。

+0

好问题。不明白为什么人们低估了它。 – hhsadiq

The sample在链接中向您展示如何以跨平台的方式实现集成。 Stripe使用Cloud Functions for Firebase集成在那里。这意味着它运行在客户端之外的Google服务器上。它可以在iOS,Android和Web上工作。当您写入/stripe_customers/{userId}/charges/{id}时,会触发该功能并执行付款。是的,你不必建立你自己的服务器。如果你不熟悉的火力地堡云功能,然后检查这些资源:

Cloud Functions for Firebase Usage Guide

Cloud Functions for Firebase samples

Getting Started with Cloud Functions for Firebase - Firecasts

Database Triggers with Cloud Functions for Firebase - Firecasts

+0

好的,真棒。非常感谢!我一直在研究这一段时间,并且永远找不到直接的答案。 – sishirm

如果有人有兴趣更高支付流程与Stripe,我们使用它的方式如下 -

1) iOS/Android provides card details to Stripe using native SDK 
2) Stripe provides a token which you send it to your Firebase 
3) Firebase cloud function then triggers a function and uses this token to make a payment or create Stripe customer and make payment 
4) after you make payment, store required information like amount paid, date etc on Firebase so that ios/Android can list payments on the app 
+0

您如何将令牌发送给Firebase?我试图使用childbyautoid,但它不接受参数。我已经读过,它的行为与push()的行为相同,但是从教程中,push将令牌作为参数接受。 – sishirm