我遵循了card.io的所有说明。
摄像头看起来像是在扫描,但永远不会通过delegate返回。我是不是遗漏了什么?
即使当我尝试这个例子时,它也会输入我的应用程序id,而它不会扫描。我要等很长时间才能扫描吗?
这是我的密码
.h文件
@interface MasterCheckoutCreditCardViewController : UIViewController<CardIOViewDelegate>.m文件
- (void)viewDidLoad {
[super viewDidLoad];
if (![CardIOView canReadCardWithCamera]) {
NSLog(@"troubles in paradise");
}
CardIOView* cioView = [[CardIOView alloc]initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 200)];
cioView.appToken = @"app_token";
cioView.delegate = self;
cioView.guideColor = [UIColor whiteColor];
[self.view addSubview:cioView];
}
-(void)cardIOView:(CardIOView *)cardIOView didScanCard:(CardIOCreditCardInfo *)cardInfo {
if (cardInfo) {
// The full card number is available as info.cardNumber, but don't log that!
NSLog(@"Received card info. Number: %@, expiry: %02i/%i, cvv: %@.", cardInfo.redactedCardNumber, cardInfo.expiryMonth, cardInfo.expiryYear, cardInfo.cvv);
// Use the card info...
}
}发布于 2014-09-25 21:11:34
这里是card.io的戴夫。
你试过各种信用卡吗?有许多卡片是card.io无法成功扫描的。这些包括较新的样式卡,缺乏传统的大,浮雕卡号码。即使在传统的卡片中,也有一些人的背景颜色或图案使扫描变得困难。
我建议尝试一些简单的,传统的签证或MasterCard卡开始。
https://stackoverflow.com/questions/26045937
复制相似问题