加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 从磁条输入信号卡

发布时间:2020-12-15 18:37:28 所属栏目:asp.Net 来源:网络整理
导读:有没有人知道如何解析从磁卡Swiper输入的信用卡串? 我尝试了一个JavaScript解析器,但从来没有工作。这就是输入的样子。 %BNNNNNNNNNNNNNNNN^DOE/JOHN^1210201901000101000100061000000?;NNNNNNNNNNNNNNNN=12102019010106111001? N是信用卡号码。 解决方法
有没有人知道如何解析从磁卡Swiper输入的信用卡串?

我尝试了一个JavaScript解析器,但从来没有工作。这就是输入的样子。

%BNNNNNNNNNNNNNNNN^DOE/JOHN
^1210201901000101000100061000000?;NNNNNNNNNNNNNNNN=12102019010106111001?

N是信用卡号码。

解决方法

见 Magnetic Stripe Card entry @ Wikipedia:

Track one,Format B:

  • Start sentinel — one character (generally ‘%’)
  • Format code=”B” — one character (alpha only)
  • Primary account number (PAN) — up to 19 characters. Usually,but not
    always,matches the credit card number
    printed on the front of the card.
  • Field Separator — one character (generally ‘^’)
  • Name — two to 26 characters
  • Field Separator — one character (generally ‘^’)
  • Expiration date — four characters in the form YYMM.
  • Service code — three characters
  • Discretionary data — may include Pin Verification Key Indicator (PVKI,
    1 character),PIN Verification Value
    (PVV,4 characters),Card Verification
    Value or Card Verification Code (CVV
    or CVK,3 characters)
  • End sentinel — one character (generally ‘?’)
  • Longitudinal redundancy check (LRC) — one character (Most reader devices
    do not return this value when the card
    is swiped to the presentation layer,
    and use it only to verify the input
    internally to the reader.)

我希望数据是假的,否则任何人都可以得到:

>名称
>到期日
> CVV

我不知道,但我认为可以使用LRC计算信用卡号码(或可能性的数量)。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读