gpt4 book ai didi

javascript - React Native 信用卡扫描仪面临问题

转载 作者:行者123 更新时间:2023-12-03 05:22:10 25 4
gpt4 key购买 nike

我有一个用 React Native 编写的代码,用于扫描信用卡信息。我关注了https://github.com/kayla-tech/react-native-card-io 。扫描仪能够读取我的卡号,但无法读取我的有效期和 cvv。下面给出的是代码。

componentDidMount() {
CardIOUtilities.preload();
}

alertfunction(out){
this.props.navigator.replace({id:'CreditCardPayment'})
console.log(out);
}

<View>
<CardIOView
style={styles.preview}
hideCardIOLogo={true}
allowFreelyRotatingCardGuide={true}
scanInstructions={'Hold card here. It will scan automatically.'}
scannedImageDuration={2}
detectionMode={CardIOView.automatic}
scanExpiry={true}
didScanCard={result => this.alertfunction(result)} />
</View>

如有任何帮助,我们将不胜感激。谢谢

最佳答案

而不是使用检测模式:自动,使用检测模式 :cardImageAndNumber 因为自动模式以 CardIODetectionModeCardImageAndNumber 启动,但如果扫描在合理时间内未成功,则回退到 CardIODetectionModeCardImageOnly。

这里的文档与您正在使用的文档相同。在这里查看不错的文档: https://github.com/Kerumen/react-native-awesome-card-io

关于javascript - React Native 信用卡扫描仪面临问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41330197/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com