【问题标题】:get undefined is not an object when trying to stripe.init尝试stripe.init时获取未定义不是对象
【发布时间】:2017-09-12 04:08:49
【问题描述】:

我正在尝试使用tipsi-stripe,但在调用stripe.init 时出现以下错误

代码

import stripe from 'tipsi-stripe'

stripe.init({
  publishableKey: 'key',
  // merchantId: 'merchant_id', // Optional
})

错误

【问题讨论】:

  • 确保您使用正确版本的条库以及您正在使用的正确反应本机版本

标签: react-native stripe-payments


【解决方案1】:

当我忘记链接本机模块时,我已经看到了这个错误。您似乎没有链接原生模块。

确保你这样做

react-native link tipsi-stripe

rnpm link

【讨论】:

    猜你喜欢
    • 2021-12-14
    • 1970-01-01
    • 1970-01-01
    • 2020-12-03
    • 1970-01-01
    • 2021-06-13
    • 2023-04-07
    • 1970-01-01
    • 2022-01-18
    相关资源
    最近更新 更多