Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
how to save the CVV code in saved_cc mode
 
foreigner
Jr. Member
 
Total Posts:  2
Joined:  2008-06-30
 

The question is not about the legality of saving the CVV code ( I know it had already been discussed ). There is no legal problem in my country.

I need to save the CVV code in saved_cc mode, to be able to do the payment on a POS terminal.

I changed app\code\core\Mage\Payment\Model\Method\Cc.php

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

but the CVV is not saved .

Could you please help about getting the CVV code saved.

And moreover, which object should I modified to have the CVV code deleted when the POS transaction is accomplished.

Many thanks for your help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sherrie
Moderator
 
Avatar
Total Posts:  1636
Joined:  2007-12-14
Illinois, USA
 

edit:  I just re-read your post more carefully, so nevermind. smile

 Signature 

Creativity is falling in love with the world. – Dewitt Jones
Community Extensions: Pickup at Event/Multiple Flatrates + Minimum Quantity Required
I’m a very random person, catch me if you can: http://www.twitter.com/sherrierohde

 
Magento Community Magento Community
Magento Community
Magento Community
 
blekm
Jr. Member
 
Total Posts:  21
Joined:  2008-01-31
 
foreigner - 30 June 2008 01:35 PM

The question is not about the legality of saving the CVV code ( I know it had already been discussed ). There is no legal problem in my country.

I need to save the CVV code in saved_cc mode, to be able to do the payment on a POS terminal.

I changed app\code\core\Mage\Payment\Model\Method\Cc.php

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

but the CVV is not saved .

Could you please help about getting the CVV code saved.

And moreover, which object should I modified to have the CVV code deleted when the POS transaction is accomplished.

Many thanks for your help.

have you resolve? Can you save the cvv number in db?

 
Magento Community Magento Community
Magento Community
Magento Community
 
salbertson
Jr. Member
 
Total Posts:  27
Joined:  2008-05-04
 

Your code should be saving the digits. What version are you running? Try using this query this query in a query browser to see if the number is saved:

SELECT
  sale
.increment_idquote_entity_varchar.value
FROM
  sales_order 
as sale
  JOIN sales_quote 
as quote on sale.increment_id quote.reserved_order_id
  JOIN sales_quote_entity 
as quote_entity on quote.entity_id quote_entity.parent_id
  JOIN sales_quote_entity_varchar 
as quote_entity_varchar on quote_entity.entity_id quote_entity_varchar.entity_id
WHERE
  quote_entity_varchar
.attribute_id 227
;

Make sure to lookup your attribute id for “cc_cid_enc” in table eav_attribute and make sure it is 227 in your db.

If records come back then the digits are saving.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xinmart.com
Jr. Member
 
Total Posts:  2
Joined:  2008-12-06
 

Tables in new version changed, it seems I have to change to:
SELECT sale.increment_id, quote_entity_varchar.value
FROM
sales_order as sale
JOIN sales_flat_quote as quote on sale.increment_id = quote.reserved_order_id
JOIN sales_order_entity as quote_entity on quote.entity_id = quote_entity.parent_id
JOIN sales_order_entity_varchar as quote_entity_varchar on quote_entity.entity_id = quote_entity_varchar.entity_id
WHERE
quote_entity_varchar.attribute_id = 369 ;

Also, changed app\code\core\Mage\Payment\Model\Method\Cc.php

Just need to remove the comments.

I still could not save cvv though.

 Signature 

Nintendo Wii,DS Lite,Unlock GSM Phones,unlock Code,unlcok SIM

 
Magento Community Magento Community
Magento Community
Magento Community
 
pableu
Jr. Member
 
Total Posts:  29
Joined:  2008-09-19
 

How about just changing the following Line in app/code/core/Mage/Payment/Model/Method/Cc.php from this

$info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
to this
$info->setCcNumberEnc($info->encrypt($info->getCcCid().' - '.$info->getCcNumber()));

This would <b>prepend</b> the CVV/CVC to the actual Creditcard-Number before it’s saved.

Haven’t tried it because I don’t really need it, but I guess it should work.

If you want your change to survive upgrades, you should copy the changed from app/code/core/Mage/Payment/Model/Method/Cc.php to app/code/<b>local</b>/Mage/Payment/Model/Method/Cc.php

And of course, you’ll have to check with your countries and your providers regulations if you’re allowed to save such sensitive information grin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|1690 users currently online|497335 forum posts