首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CardIO无法获取我的卡信息

CardIO无法获取我的卡信息
EN

Stack Overflow用户
提问于 2013-11-09 00:46:13
回答 1查看 2.4K关注 0票数 2

我正在测试cardIO的iOS SDK用于扫描信用卡,我遵循了https://github.com/card-io/card.io-iOS-SDK中的说明,但我打开了我的CardIOPaymentViewController它没有扫描我的卡,没有回调到"userDidProvideCreditCardInfo:“否则当我取消控制器时"userDidCancelPaymentViewController:”被调用。我是不是漏掉了什么?

请注意,卡的位置正确,并且我使用的是Visa卡。

我的消息来源:

代码语言:javascript
复制
@interface TestViewController : UIViewController <CardIOPaymentViewControllerDelegate>

- (IBAction)scanCard:(id)sender;

@end

@implementation TestViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (IBAction)scanCard:(id)sender{
    CardIOPaymentViewController *scanViewController = [[CardIOPaymentViewController alloc] initWithPaymentDelegate:self];
    scanViewController.appToken = @"app-token";
    scanViewController.collectCVV = YES;
    scanViewController.collectExpiry = YES;
    scanViewController.useCardIOLogo = YES;
    [self.navigationController presentViewController:scanViewController animated:YES completion:nil];
}

- (void)userDidCancelPaymentViewController:(CardIOPaymentViewController *)scanViewController {
    NSLog(@"User canceled payment info");
    // Handle user cancellation here...
    [scanViewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewController:(CardIOPaymentViewController *)scanViewController {
    // The full card number is available as info.cardNumber, but don't log that!
    NSLog(@"Received card info. Number: %@, expiry: %02lu/%lu, cvv: %@.", info.redactedCardNumber, (unsigned long)info.expiryMonth, (unsigned long)info.expiryYear, info.cvv);
    // Use the card info...
    [scanViewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

致以问候。

EN

回答 1

Stack Overflow用户

发布于 2013-11-26 06:37:08

这里是card.io的戴夫。

并非所有卡都能被card.io成功扫描。例如,最近的一些信用卡使用小的、非浮雕的数字,而不是card.io目前设计的传统的大的、凸起的数字。

尝试几种不同的卡,以确定这是否是特定于卡的问题。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19864303

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档