javascript - 如何用 React Native 实现 Stripe?

标签 javascript reactjs react-native stripe-payments fetch-api

我研究过如何使用 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 中所述)。

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

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

提前致谢

最佳答案

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

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

关于javascript - 如何用 React Native 实现 Stripe?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40092731/

相关文章:

javascript - 如何在 Javascript 中编写 for 循环内部变量或者是否有替代解决方案?

javascript - 如何将 iframe 面板注入(inject) Google Chrome 扩展并在 iframe 内添加点击事件?

javascript - 如何使用包含一些组件名称的数组来渲染那些预定义的组件

javascript - jsx 中的 React 组件未渲染为 html

android - 未定义的原生模块

android - 如何从 React-Native 获取 onresume 事件?

javascript - 循环遍历数组以过滤对象数组

javascript - chrome 中的转换闪烁

javascript - react native 刷新组件

unit-testing - 使用 jest 进行测试时如何模拟 react-native-google-analytics-bridge?