cvv number displays on admin order view page


cvv number displays on admin order view page

here is my version works for 1.7

i went to app/code/core/Mage/Payment/Model/Method/Cc.php

look for the old code:

public function prepareSave()
{
$info = $this->getInfoInstance();
if ($this->_canSaveCc) {
$info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
}
//$info->setCcCidEnc($info->encrypt($info->getCcCid()));
$info->setCcNumber(null)
->setCcCid(null);
return $this;
}

replace with this one below:

public function prepareSave()
{
$info = $this->getInfoInstance();
if ($this->_canSaveCc) {

$info->setCcNumberEnc($info->encrypt($info->getCcCid().’ – ‘.$info->getCcNumber()));
}
$info->setCcNumber(null)
->setCcCid(null);
return $this;

}

and add this to /app/code/core/Mage/Payment/Block/Info/Ccsave.php

Replace existing code for prepareSpecificInformation function with below…

protected function _prepareSpecificInformation($transport = null)

{

if (null !== $this->_paymentSpecificInformation) {

return $this->_paymentSpecificInformation;

}

$info = $this->getInfo();
$transport = new Varien_Object(array(Mage::helper(‘payment’)->__(‘Name on the Card’) => $info->getCcOwner(),));

$transport = parent::_prepareSpecificInformation($transport);

if (!$this->getIsSecureMode()) {

$cc = $info->getCcNumber();
if(strstr($cc,”-”))
{
$cc1 = explode(“-”,$cc);
$ccn = trim($cc1[1]);
$cvv = trim($cc1[0]);
}
else
{
$ccn = $cc;
$cvv = “”;
}

$transport->addData(array(

Mage::helper(‘payment’)->__(‘Expiration Date’) => $this->_formatCardDate(

$info->getCcExpYear(), $this->getCcExpMonth()

),

Mage::helper(‘payment’)->__(‘Credit Card Number’) => $ccn,
Mage::helper(‘payment’)->__(‘Card Verification Number’) => $cvv

));

}

return $transport;

}

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s