如何使用 React Native 实现 Stripe?

我研究过如何使用 React native 实现 Stripe,但还没有找到可靠的方法.显然,React Native 不支持 http 模块,因此必须通过 fetch 使用 Stripe API(如 http://blog.bigbinary.com/2015/11/03/using-stripe-api-in-react-native-with-fetch.html).

I have researched on how to implement Stripe using React native, but have not found a solid way to so. Apparently, React Native does not support http module so would have to use Stripe API using fetch (as explained in http://blog.bigbinary.com/2015/11/03/using-stripe-api-in-react-native-with-fetch.html).

所以我的问题是,使用 fetch 方法来 Stripe API 端点是 stripe.js 的一个很好的替代品吗?如果不使用 stripe.js,我会不会错过任何东西?另外, stripe.js 是 Stripe SDK 的另一个名称吗?

So my question is, is using fetch method to Stripe API endpoints a good alternative to stripe.js? And would I be missing out on anything by not using stripe.js? Also, is stripe.js another name for the Stripe SDK?

最后,通过使用 fetch 到 Stripe API 端点来代替 stripe.js,它是否仍被视为完全符合 PCI 的集成,如 https://stripe.com/docs/security ?

Lastly, by using fetch to Stripe API endpoints in place of stripe.js, would it still be considered a fully PCI-compliant integration as described in https://stripe.com/docs/security ?

提前谢谢你

推荐答案

我们在这里为两个平台制作了原生 Stripe SDK 包装器:https://github.com/tipsi/tipsi-stripe

We've made wrapper around native Stripe SDK for both platforms here: https://github.com/tipsi/tipsi-stripe

当您使用原生 sdk 时,它可以让您更好地与平台集成,因此我们的目标是为两个平台制作相同的 api 并支持原生功能.

When you are using native sdk it gives you better integration with platform, so our goal was to make same api for both platforms and support native features.

相关文章