更改 Magento 管理中信用卡信息的显示
在 Magento 中,我们使用 StoredCC 程序在 Magento 管理员之外进行信用卡验证。信息正确存储在数据库中,并且符合 PCI 准则,确保安全。但是,如果我登录 Magento 的管理员并转到“销售”->“订单”并选择一个订单,订单页面将显示解密的信用卡号。
我知道 Magento 数据库还存储信用卡的最后四位数字,所以我想做的是将这个位置的显示从完整的信用卡号更改为类似 *-*-**-#### 或完全抑制数字的显示。在旧版本的 Magento 中,我会通过修改 /app/design/adminhtml/default/default/template/ payment/info/cc.phtml 来做到这一点,但看起来其中包含的内容已被移至 getPaymentHTML() 但我是不是100%确定。
最终目标是在编程级别而不是 CSS 级别更改或隐藏 Admin 中的信用卡信息。谢谢!
Within Magento we are using the StoredCC procedure to do credit card verification outside of the Magento Admin. The information is stored properly in the database and is secure properly with PCI guidelines. However, if I log into Magento's Admin and go to Sales->Orders and choose an order, the order page will show me the decrypted credit card number.
I know that the Magento database also stores the last four digits of the credit card so what I would like to do is change the display in this location from the full credit card number to something like *-*-**-#### or suppress the display of the number completely. In older versions of Magento I would do this by modifying /app/design/adminhtml/default/default/template/payment/info/cc.phtml but it looks like whatever was contained in there has been moved to getPaymentHTML() but I am not 100% sure.
Ultimate goal, change or suppress the credit card information in Admin at the programming level and not the CSS level. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
付款详细信息显示的工作方式是,它想要显示的任何信息都在 Mage/Payment/Block/Info/Ccsave.php 文件的
_prepareSpecificInformation()
中返回。您应该感兴趣的代码块是我不记得“保存的 CC”模式是否也保存了最后 4 个,但如果是的话,您可以将
getCcNumber()
替换为getCcLast4 ()
。如果该选项不可用,您也可以对$info->getCcNumber()
执行substr()
来仅显示最后 4 个。The way that the payment detail display works is that any information it wants to get displayed is returned in
_prepareSpecificInformation()
of the Mage/Payment/Block/Info/Ccsave.php file. The chunk of code you should be interested in isI don't recall if Saved CC mode also saves the last 4, but if it does you can just swap out the
getCcNumber()
withgetCcLast4()
. If that isn't available, you could also just do asubstr()
on$info->getCcNumber()
to only show the last 4.