在iOS上与Firebase进行条带集成 [英] Stripe Integration With Firebase on iOS

查看:204
本文介绍了在iOS上与Firebase进行条带集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个使用Firebase作为后端的iOS应用程序,并希望在没有外部服务器的情况下实现Stripe。
我已经检出了这个帖子: Firebase付款网关? - 并显示以下有关Stripe支付流程/网关的流程:
$ b $ ol
  • 用户在您的网站上启动交易
  • 客户端代码将它们发送到Stripe以输入其CC信息

  • 客户端代码获取代表安全交易的代币
  • 服务器进程在交易被验证时通过分条通知

  • 服务器使用令牌
  • 提交支付授权
  • Stripe将交易收据发送到服务器进程或Zapier,将其存储在Firebase中

  • 关于Zapier,我已经联系了Firebase ,他们告诉我Zapier不再支持这个过程。
    另外:与Braintree不同,它需要生成令牌服务器端,Stripe的密钥与我的帐户相关联。理论上来说,我可以使用Firebase的REST API来将Stripe与外部服务器整合在一起,是正确的吗?

    >

    我们可以使用任何Firebase实时数据库网址作为REST端点。我们所要做的就是将.json附加到URL的末尾,并发送来自我们最喜欢的HTTPS客户端的请求。
    https://firebase.google.com/docs/database/rest/开始


    任何帮助真的很感激,谢谢!

    解决方案

    > Stripe的API库或其第三方集成之一。



    6似乎正在描述webhooks,而 可能 可能只需连线 Stripe webhooks 直到 Firebase保存网址,但最终您需要某种应用程序来处理服务器上的费用。


    I'm building an iOS application using Firebase as my backend and want to implement Stripe without an external server. I've already checked out this post: Firebase payment gateways? — and it shows the following process regarding Stripe's payment process/gateway:

    1. User initiates transaction on your site
    2. Client code sends them to Stripe to enter their CC info
    3. Client code obtains a token representing the secure transaction
    4. A server process is notified by stripe when the transaction is validated
    5. The server submits the payment authorization with the token
    6. Stripe sends a transaction receipt to the server process or Zapier, which would be stored back in Firebase

    I've already contacted Firebase regarding Zapier and they told me that Zapier doesn't support this process anymore. Also: Unlike Braintree, which requires to generate a token server-side, Stripe's key is associated with my account.

    Theoretically then, I would be able to integrate Stripe with no external server using Firebase's REST API, correct?

    We can use any Firebase Realtime Database URL as a REST endpoint. All we need to do is append .json to the end of the URL and send a request from our favorite HTTPS client. https://firebase.google.com/docs/database/rest/start

    Any help is really appreciated, thanks!

    解决方案

    Step 4, 5 and ~6 still require a server-side application running one of Stripe's API libraries or one of their third-party integrations.

    6 seems to be describing webhooks, and it might be possible to just wire Stripe webhooks right up to a Firebase 'save' URL, but ultimately you need some kind of application to process the charges on a server.

    这篇关于在iOS上与Firebase进行条带集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆