【发布时间】:2021-10-21 09:12:48
【问题描述】:
我正在尝试设置一种方法,以便在 React Native Expo 项目中使用预构建的 Stripe 组件为以后设置付款。
我正在关注这个项目:https://snack.expo.dev/@charliecruzan/stripe-react-native-example?platform=mydevice
如果您转到PaymentsUICustomScreen.tsx,您会看到有一个选项可以保存付款以供稍后在屏幕上呈现该选项时使用。
当我实现相同的代码时,我没有得到相同的选项。
我正在使用useStripe 函数。
这是流程:
import { useStripe } from '@stripe/stripe-react-native'
...
const { initPaymentSheet, presentPaymentSheet } = useStripe();
...
await initPaymentSheet({
customerId: 'customerID',
// customerEphemeralKeySecret: ephemeralKey,
paymentIntentClientSecret: clientSecret,
customFlow: false,
merchantDisplayName: 'Example Inc.',
applePay: true,
merchantCountryCode: 'US',
style: 'alwaysDark',
googlePay: true,
testEnv: true,
});
我的问题是,为什么我没有保存付款方式以备后用?
【问题讨论】:
标签: react-native expo stripe-payments