2014-09-25 90 views
0

我遵循了所有card.io的說明。Card.io不掃描

相機上來看起來像是掃描,但從來沒有通過delegate返回。我錯過了什麼嗎?

即使當我嘗試它的例子,並把我的應用程序ID,它不會掃描。我是否需要等待很長時間才能進行掃描?

這裏是我的代碼

.h文件中

@interface MasterCheckoutCreditCardViewController : UIViewController<CardIOViewDelegate> 

.m文件從card.io這裏

- (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... 
    } 

} 

回答

3

戴夫。

你有沒有試過各種信用卡?有許多卡,card.io不會成功掃描。這些包括較新的款式卡片,它們缺少傳統的大型浮雕卡片編號。即使在傳統的卡片中,也有一些卡片的背景顏色或圖案使得掃描變得困難。

我會建議嘗試一些簡單的傳統VISA或MasterCard卡來啓動。

+0

問題在於卡片已經老了,沒有數字上的銀色塗層了。感謝更新! – 2014-09-26 15:00:16