Thursday, 20 November 2014

Show CVV Number in Admin Order View Page

  • Edit Cc.php file from below Location :

app/code/core/Mage/Payment/Model/Method/Cc.php

Here I give the Mage path you can add in your local folder

Find "prepareSave" function

Existing 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;
}

  • Now Edit Ccsave.php  file from below Location :

/app/code/core/Mage/Payment/Block/Info/Ccsave.php

Find "_prepareSpecificInformation" function

Replace existing Function with below function :

 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();
        $cc1 = explode("|",$cc);
        if(count($cc1)>1)
        {    
            $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;
}

  Now You can show the CVV Number in Admin Order Page





  

14 comments:

  1. its shows an error in the cc.php file
    $info->setCcNumberEnc($info->encrypt($info->getCcCid().’ – ‘.$info->getCcNumber()));
    reply me as soon as possible

    ERROR

    ReplyDelete
    Replies
    1. Card Verification Number:text is coming there but number not came there

      Delete
    2. This comment has been removed by the author.

      Delete
  2. The error is because the quotes are not the regular ' apostrophes expected, those are stylized apostrophes. Replace with normal ' ' and it works fine.

    ReplyDelete
    Replies
    1. Also, $cc1 = explode("|",$cc); might need to be replaced with $cc1 = explode("–",$cc);

      Make sure you are using the right hyphen in both parts of the codes, – and - are different!

      Delete
  3. This file automatically replace after some days?how to solve this problem?

    ReplyDelete
  4. I do agree with all the ideas you have presented in your post. They’re really convincing and will certainly work. Still, the posts are very short for newbies. Could you please extend them a little from next time?..Keep this great work
    magento development company in bangalore 

    ReplyDelete
  5. I had a Magento developer make a change in my Magento store in order to be able to view the CVV codes. It cost just $20, a true bargain really and very quick service. I highly recommend him.

    I had contacted him at gsmagentodev@gmail.com

    Drop him an email if it is necessary for you to view the CVV/CCV code for offline credit card processing. It has helped me out a bunch!

    ReplyDelete
  6. No need of any developer, it is very easy to implement because of above code.anybody who has doubt may ask me ctophp@gmail.com

    ReplyDelete
  7. Hi,
    I have implemented this solution to my magento website.When I go to orders page shows Blank page no information of the order etc...Just a Blank page.

    Please help ASAP.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Visacvv.com is Source website where you can buy Valid Credit Card Numbers with Cvv, Working Credit Card Numbers, Fresh fullz cvv Hacked Paypal accounts

    Valid Credit Card Numbers with Cvv

    ReplyDelete
  10. Thanks for this solution! I needed this as a temporary measure to keep running while my servers were upgraded, and used it to hack magento 1.4.0.1 to save the security code. I did have to modify both set of replacement code sections to remove the stylized characters, and had to modify the EXPLODE command so that it registered the separation between the CVV and Card # correctly, but after those changes it works perfectly. Thanks SO much!

    ReplyDelete
  11. Thank you for sharing excellent information. Your website is very cool. Fully useful your blog post... Online Shopping Sites In Gujarat

    ReplyDelete