reactjs Stripe React Native:原生代码和Javascript代码不同步

yftpprvb  于 2023-03-29  发布在  React
关注(0)|答案(1)|浏览(145)

使用这些版本的React Native和Stripe。当调用presentPaymentSheet时,我在图像中得到错误。有人以前见过这个错误吗?

"@stripe/stripe-react-native": "^0.26.0",
"react-native": "0.71.1",
export async function paymentProcess(info: PaymentInfoType) {
    const initResult = await initPaymentSheet({
        customerId: info.customerId,
        paymentIntentClientSecret: info.paymentIntentClientSecret,
        customerEphemeralKeySecret: info.ephemeralKeySecret,
        //
        ...initPaymentSheetParams,
    });

    if (initResult.error) {
        throw new Error('Failed on init.');
    }

    const result = await presentPaymentSheet({ timeout: 2000 });
}

vdzxcuhz

vdzxcuhz1#

我建议你删除node_modules文件夹和yarn.lock文件,然后执行yarn install从头开始构建react-native项目。

相关问题