IOS8在Safari和Apple Pay中具有一些内置功能,可以使用视频摄像头扫描信用卡,这样用户就不必手动输入数字。 任何人都知道有一个API调用或开箱即用的控制器可用于Swift,允许将此功能添加到任何IOS应用程序?
答案 0 :(得分:-3)
这正是您所寻找的:
你需要的是card.io:
实现一个简单的ViewController Card IO Reader:
- (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: %02i/%i, cvv: %@.", info.redactedCardNumber, info.expiryMonth, info.expiryYear, info.cvv);
// Use the card info...
[scanViewController dismissViewControllerAnimated:YES completion:nil];
}
委托检索卡信息的方法:
Result = sum(cumsum(A ~= 0) == 0) + 1;
由PayPal创建并被许多热门应用程序使用。
祝你好运!