Using Cloud Functions for Firebase as my backend for implementing Stripe in iOS?

戏子无情 提交于 2019-12-12 04:38:40

问题


I currently have an iOS app that implements Firebase to authenticate users and store data references in its realtime database. I want to add a feature to the app where the logged in users can purchase a good and I want to use Stripe to process the payment. I know in order for Stripe to work, a backend server must be uses to help the transaction go through since Stripe only delivers a token and doesn't actually process the payment themselves. I was curious as it's possible to just use Cloud Functions for Firebase as my backend sever to communicate with Stripe instead of having to use another backend service. It makes sense try to implement Stripe with Firebase since my app already relies on Firebase for all its sever side functions. Any help, or advice that could point me in the right direction on how to accomplish this will definitely will be appreciated.


回答1:


You most certainly can hook Stripe into your app (not just iOS, but any client platform). There is sample code provided by the Firebase team that illustrates how you might use a database trigger to initiate a payment using Stripe's node.js API.



来源:https://stackoverflow.com/questions/45900138/using-cloud-functions-for-firebase-as-my-backend-for-implementing-stripe-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!