React native tipsi stripe错误您应该首先调用init



我正在使用tipsi-stripe' for payment but when click submit it's showing error您应该先调用init`下面是我的代码

setIsLoading(true);
const aa = await stripe.createTokenWithCard({
cvc: "123", 
expMonth: 11, 
expYear: 2022,
number: "4242424242424242",
});
if (aa) {
console.log(aa.tokenId);
setModal(false);
} else {
setIsLoading(true);
}

有人能告诉我为什么显示这个错误吗?

听起来你没有正确初始化包:https://tipsi.github.io/tipsi-stripe/docs/usage.html

最新更新