Stripe Connect Firebase功能 [英] Stripe Connect Firebase Functions

查看:62
本文介绍了Stripe Connect Firebase功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

环顾四周,试图通过swift捕获代码,但是仍然需要一个函数来启动代码以连接Express帐户.

Looked all over, tried capturing the code via swift but still need a function to fire off the code to get an Express account to connect.

不会浪费时间尝试代码,因此寻找Firebase Functions来设置Stripe Connect端点进行重定向并发回代码以完成过程.

Won't waste your time with the code attempts, so looking for Firebase Functions that will setup a Stripe Connect endpoint for redirection and send back the code to finalise the process.

有人愿意帮助吗?

感谢您的阅读.

推荐答案

您将要执行以下操作:

  1. 在您的应用中打开浏览器或网络视图.让用户浏览表单以注册Stripe帐户.
  2. 使用Firebase的功能通过HTTP请求调用函数,以定义终结点您可以将其设置为连接redirect_uri .假设https://us-central1-example.cloudfunctions.net/connect_redirect
  3. 在Firebase函数中,您将获取查询字符串(request.query.code)中包含的code参数,然后
  1. Open a browser or web view from your App. Let the user work through the form to sign up for a Stripe account.
  2. Use Firebase's ability to call functions via HTTP requests, to define an endpoint that you can set as your Connect redirect_uri. Let's say https://us-central1-example.cloudfunctions.net/connect_redirect
  3. In your Firebase function, you will grab the code parameter that's included in the query string (request.query.code), then to complete the connection process, use a HTTP client to POST the appropriate data to https://connect.stripe.com/oauth/token
  4. In the return of your Firebase function, either supply a message encouraging the user to close their browser, OR create a redirect, directing the user back to your app (using something like a custom url scheme as the redirect destination)

这篇关于Stripe Connect Firebase功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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