I am during the expansion and development of cash flow
There is a problem to obtain the information of the credit card form, but read less than a credit card verification number (CVN)
For example, class
class Xxx_Yzz_Model_Method_Zcc extends Mage_Payment_Model_Method_Abstract
{
public function setParams ()
{
....
$ CcCid = $ this-> getInfoInstance () -> getCcCid ();
....
}
}
I reference the Mage_Payment_Model_Method_Cc of, inside the assignData override, but in vain
public function assignData ($ data)
{
if (! ($ data instanceof Varien_Object)) {
$ data = new Varien_Object ($ data);
}
$ info = $ this-> getInfoInstance ();
$ info-> setCcType ($ data-> getCcType ())
-> setCcOwner ($ data-> getCcOwner ())
-> setCcLast4 (substr ($ data-> getCcNumber (), -4))
-> setCcNumber ($ data-> getCcNumber ())
-> setCcCid ($ data-> getCcCid ())
-> setCcExpMonth ($ data-> getCcExpMonth ())
-> setCcExpYear ($ data-> getCcExpYear ())
-> setCcSsIssue ($ data-> getCcSsIssue ())
-> setCcSsStartMonth ($ data-> getCcSsStartMonth ())
-> setCcSsStartYear ($ data-> getCcSsStartYear ())
;
return $ this;
}
In addition, I also made reference to the Mage_Payment_Model_Method_Cc, prepareSave override, can only obtain a credit card number, but did not get verification code
public function prepareSave ()
{
$ info = $ this-> getInfoInstance ();
if ($ this-> _canSaveCc) {
$ info-> setCcNumberEnc ($ info-> encrypt ($ info-> getCcNumber ()));
}
// $ info-> setCcCidEnc ($ info-> encrypt ($ info-> getCcCid ()));
// These three lines seems useless
$ info-> setCcNumber (null)
// These three lines seems useless
-> setCcCid (null);
// These three lines seem useless
return $ this;
}
Hope you can help me, thank you
In order to save the CVV code (verification code), the prepareSave() method should look like this:
Unless this saving/retrieving functionality was also disabled elsewhere, that should make Magento save the CVV Code. I believe that line that was commented out was what used to set the CVV Code to be saved in the database.
You may have to edit a template file for the admin to also make it show on the order management page. I’m not positive though.
At some point Magento stopped storing CVV codes for a reason as it violates the terms of service with credit card companies. I don’t recommended re-introducing this functionality, but there ya go. Let me know if that works (unless you already found the solution).