4

I have been searching a lot and seen a lot of similar questions but non of them fits in my requirements.

I need to implement Stripe in react-native built using expo XDE. As mentioned in expo docs here: https://docs.expo.io/versions/latest/sdk/payments.html#importing-payments, I will have to detach my project to implement payment but I don't want to do that. Is there any alternative? Also other wrappers available on GitHub doesn't facilitates projects built with expo completely. I am unable to find any complete wrapper or at least a guide to build my own.

I am looking for a solution for subscription based model, I need to charge my customers recursively and allow them to upgrade/downgrade their packages during an on going paid/trial period. I don't want to hold credit card information and allow customers to update their billing information whenever needed. Implement refund policies as well.

4

3 回答 3

6

如果您不想退出 Expo,您可以expo-stripe-checkout在 iOS 和 Android 上使用 StripeCheckout 组件(尽管在 Android 上您仍然可以使用 Payments 模块)。这是带有进一步说明的回购链接:https ://github.com/briansztamfater/expo-stripe-checkout

于 2019-02-08T22:45:56.477 回答
2

我最近遇到了同样的问题,这是结论:

短版:如果您需要在 iOS 上付款(Stripe),则需要分离。如果您不这样做,请使用PaymentsExpo 中的模块 - 这并不明显,但他们确实在文档中声明了它所基于的tipsi-stripe)。

说明:Expo SDK 曾经包含一个适用于 Android 和 iOS 的支付模块。对于最近 3-4 个版本的 Expo,Payments已从 iOS SDK 中删除,因为“Apple 有时会拒绝包含 Stripe SDK 但不提供任何出售的应用程序。”。

参考:https ://docs.expo.io/versions/latest/sdk/payments.html

解决方案: detach 到 ExpoKit,然后Payments手动添加模块。我可以从经验中说这不是一个好的或简单的过程,因为它首先引入了使用 MacOS/Xcode 手动构建应用程序的概念,这对于 Win 用户来说至少是一件痛苦的事情。

如果您不想分离,这意味着您将不得不实现自己的自定义方式与 Stripe 进行通信,而不是他们的官方 SDK,这将意味着PCI 合规性问题。

于 2018-01-06T16:04:56.990 回答
0

您可以直接使用所有 Stripe API。在后端映射 Stripe 客户 ID 和您的用户 ID。然后您可以使用条带客户 ID 从前端调用此 API 。

于 2018-01-06T14:48:11.603 回答