【问题标题】:CardIO cant get my card InfoCardIO 无法获取我的卡信息
【发布时间】:2013-11-08 16:46:12
【问题描述】:

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

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

我的来源:

@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

问候。

【问题讨论】:

  • 是的,不要成为“那个人”,但它有点告诉你该怎么做,你需要一个userDidProvideCreditCardInfo: 方法。如果你也显示你的相关代码,它也会很有帮助。

标签: ios objective-c credit-card


【解决方案1】:

来自 card.io 的 Dave。

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

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

【讨论】:

  • 我正在使用 card.io_ios_sdk_3.8.0。解决这个非浮雕数字阅读问题需要多长时间?
  • @Meenu 我们没有立即解决这个问题的计划。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-05-24
  • 1970-01-01
  • 2016-07-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多