有没有正确的方法来掩盖15位数的信用卡号码?(Is there a correct way to mask a 15 digit credit card number?)

编程入门 行业动态 更新时间:2024-10-27 17:21:53
有没有正确的方法来掩盖15位数的信用卡号码?(Is there a correct way to mask a 15 digit credit card number?)

15位银行卡号格式为0000-000000-00000 [1] 。

如果我显示最后4位数字,它会变成xxxx-xxxxxx-x0000,看起来有点傻。

是否有正确的方法来格式化屏蔽的15位数字?

(我希望我们不会显示超过最后4个,但如果有标准,我想了解它。)

15 digit bank card numbers are formatted 0000-000000-00000[1].

If I show the last 4 digits, it becomes xxxx-xxxxxx-x0000 which looks slightly goofy.

Is there a correct way to format a masked 15 digit number?

(I expect we will not show more than the last 4 anyway, but if there is a standard, I want to know about it.)

最满意答案

真的没有标准。 绝大多数网站都显示最后四个,前面有四个X,无论信用卡号是15还是16位,这可能是您用户最容易识别的。 但是如果你真的想要格式化它以便显示卡片编号的实际结构,那么尽管有愚蠢的行为,它仍然是xxxx-xxxxxx-x0000 。 用户可能会发现显示一个额外的字符( xxxx-xxxxxx-00000 )是“不安全的”,我相信你不想让任何人有机会投诉或退款。

There is no standard really. The vast majority of sites display the last four with four X's in front them whether the credit card number is 15 or 16 digits so that would probably be the most recognizable to your users. But if you really want to format it so you show the actual structure of the card number then do it as xxxx-xxxxxx-x0000 despite the goofiness. Users may find showing an extra character (xxxx-xxxxxx-00000) is "unsafe" and I'm sure you don't want to give anyone an opportunity to complain or do a chargeback.

更多推荐

本文发布于:2023-08-07 01:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457955.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:位数   方法来   信用卡   正确   号码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!