在Magento Admin中更改信用卡信息的显示 [英] Changing the display of Credit Card information in Magento Admin

查看:65
本文介绍了在Magento Admin中更改信用卡信息的显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Magento中,我们正在使用StoredCC程序在Magento Admin之外进行信用卡验证.该信息已正确存储在数据库中,并根据PCI准则得到了适当的保护.但是,如果我登录到Magento的Admin并转到Sales-> Orders并选择一个订单,则订单页面将向我显示解密的信用卡号.

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.

我知道Magento数据库还存储了信用卡的后四位数字,所以我想做的就是将该位置的显示从完整的信用卡号更改为 * - * - * *-####或完全取消显示数字.在旧版本的Magento中,我可以通过修改/app/design/adminhtml/default/default/template/payment/info/cc.phtml来做到这一点,但看起来其中包含的内容已移至getPaymentHTML(),但我不是100%肯定.

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.

最终目标是在编程级别(而不是CSS级别)的Admin中更改或隐藏信用卡信息.谢谢!

Ultimate goal, change or suppress the credit card information in Admin at the programming level and not the CSS level. Thanks!

推荐答案

付款明细显示的工作方式是,要显示的任何信息都将在Mage/Payment/Block/Info/的_prepareSpecificInformation()中返回. Ccsave.php文件.您应该感兴趣的代码段是

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 is

if (!$this->getIsSecureMode()) {
    $transport->addData(array(
        Mage::helper('payment')->__('Expiration Date') => $this->_formatCardDate(
            $info->getCcExpYear(), $this->getCcExpMonth()
        ),
        Mage::helper('payment')->__('Credit Card Number') => $info->getCcNumber(),
    ));
}

我不记得保存CC模式是否也保存了最后4个,但是如果确实保存了,您可以将getCcNumber()换成getCcLast4().如果该按钮不可用,您也可以在$info->getCcNumber()上执行substr()以仅显示最后4个.

I don't recall if Saved CC mode also saves the last 4, but if it does you can just swap out the getCcNumber() with getCcLast4(). If that isn't available, you could also just do a substr() on $info->getCcNumber() to only show the last 4.

这篇关于在Magento Admin中更改信用卡信息的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆