CardIO无法获取我的卡信息 [英] CardIO cant get my card Info

查看:181
本文介绍了CardIO无法获取我的卡信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试cardIO的iOS SDK扫描信用卡,我按照 https://github.com/card-io/card.io-iOS-SDK ,但我打开我的CardIOPaymentViewController它不扫描我的卡,没有回调userDidProvideCreditCardInfo:否则当我取消控制器userDidCancelPaymentViewController:被调用。我错过了什么吗?

I'm testing the iOS SDK of cardIO for scanning credit card, I followed the instructions in https://github.com/card-io/card.io-iOS-SDK , but I open my CardIOPaymentViewController it dont scan my card, there is no callback to "userDidProvideCreditCardInfo: " otherwise when I cancel the controller "userDidCancelPaymentViewController: " is called. Am I missing something ?

请注意,卡片位置正确,我正在使用签证卡。

Note that the card is properly positioned and I'm using a visa card.

我的来源:

@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

问候。

推荐答案

Dave from card.io here。

Dave from card.io here.

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

Not all cards can be successfully scanned by card.io. For example, some recent credit cards use small, non-embossed digits rather than the traditional large, raised numbers for which card.io is currently designed.

尝试一些不同的信用卡用于确定这是否是卡特定问题的卡片。

Try a few different cards to determine whether this is a card-specific problem.

这篇关于CardIO无法获取我的卡信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆