尝试stripe.init时,get undefined不是对象

时间:2017-04-16 10:33:59

标签: react-native stripe-payments

我正在尝试使用tipsi-stripe,当调用stripe.init时,我收到以下错误

代码

import stripe from 'tipsi-stripe'

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

错误

enter image description here

1 个答案:

答案 0 :(得分:0)

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

确保你

react-native link tipsi-stripe

rnpm link