stripe_从iOS平台检查Stripe Connect帐户的功能

stripe

In a previous article, I discussed onboarding Stripe connect users in your iOS platform with Firebase Cloud Functions/Auth(Node.JS). If you wanna learn more about that check it out here!

在上一篇文章中,我讨论了使用Firebase Cloud Functions / Auth(Node.JS)在iOS平台上入门的Stripe连接用户。 如果您想了解更多关于此的信息,请在这里查看

If you don’t know, Stripe is a powerful payment processing platform that allows developers to create complex payment flows with minimal legal/development overhead.

如果您不知道,Stripe是一个功能强大的付款处理平台,可让开发人员以最小的法律/开发开销创建复杂的付款流程。

Connect gives you a lot of control over how you route payments. There are three basic models for routing funds in your Connect marketplace. It could be a one-to-one (Uber — rider to driver), one-to-many (online stores — user purchases from many vendors), or many to many (SaaS platform where vendors provide some virtual service).

Connect使您可以控制付款方式。 在Connect市场中,有三种基本的资金转拨模型。 它可以是一对一(Uber,从驾驶员到司机),一对多(在线商店,从许多供应商处购买用户),也可以是多对多(SaaS平台,其中供应商提供一些虚拟服务)。

One problem with payment platforms is that regulations and laws vary based on location and can change over time. Therefore, many firms find it more cost-effective to rely on payment platforms like Stripe to take

支付平台的一个问题是法规和法律会根据位置而有所不同,并且会随着时间而变化。 因此,许多公司发现依靠诸如Stripe之类的支付平台来获取成本效益更高

是时候写一些代码了! (Time to write some code!)

Stripe doesn’t offer one magical “info needed” function for their accounts. Instead, you manage the information that Stripe needs and your users’ account statuses based on the capabilities you need that user to have. With more capabilities, Stripe may need more information. This is great for us because that means we only need to prompt our users when we actually need information from them, minimizing the interruptions to their experience.

Stripe没有为其帐户提供一种神奇的“所需信息”功能。 相反,您可以根据所需用户拥有的功能来管理Stripe所需的信息和用户的帐户状态。 有了更多功能,Stripe可能需要更多信息。 这对我们来说很棒,因为这意味着我们仅在实际需要用户信息时才提示他们,从而将对用户体验的干扰降到最低。

You can check out more information on Stripe Connect Account capabilities here.

您可以在此处查看有关Stripe Connect帐户功能的更多信息。

Below, we are creating a cloud function that takes in an account ID and checks for a user’s transfer capability. This determines whether a user can transfer money to another person on your platform or make withdrawals to their bank. You can change this to whatever capability you want to check for. There’s a list of capabilities here.

在下面,我们正在创建一个云功能,该功能接受一个帐户ID并检查用户的转移能力。 这确定用户是可以将钱转给您平台上的另一个人,还是可以向其银行提款。 您可以将其更改为要检查的任何功能。 还有的功能列表在这里

On the client-side, we use Alamo-Fire to make the call to our cloud function. If it returns false, then you should pass the user into the Stripe Connect Onboarding webform (explained in the previous article).

在客户端,我们使用Alamo-Fire调用我们的云功能。 如果返回false,则应将用户带入Stripe Connect Onboarding Web表单(在上一篇文章中进行了说明 )。

Side Note: You can call cloud functions directly from your app with the Firebase Framework instead of Alamo-Fire. Check it out here.

旁注:您可以使用Firebase框架而不是Alamo-Fire从应用程序直接调用云函数。 在这里查看

If everything is done properly, this function should return true or false (if a user’s capabilities are active). You can use this to check when the user logs in, or when the user tries to use their capability in your app. I hope this helps and suggestions are always welcome!

如果一切正确完成,则此函数应返回true或false(如果用户的功能处于活动状态)。 您可以使用它来检查用户何时登录,或者用户何时尝试在应用程序中使用其功能。 希望对您有所帮助,并欢迎您提出建议!

翻译自: https://medium.com/macoclock/checking-stripe-connect-accounts-capabilities-from-your-ios-platform-1869e58ff8c4

stripe

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值