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