I want to override the default payment model class in a custom magento extension, as placing the file in local pool with same directory structure working fine but my hosting providers are telling that we have to proceed with overriding this in a custom module.
the class that I want to override is Mage_Payment_Model_Method_Cc and I want to override this in a custom module that I am developing but don't know how to write the config file for this and how to override the functionality. actually I want to overcome the error message "Please enter a valid credit card verification number." when I try to place the order using CC as a payment method and using the SOAP API. I want to comment this validation section to go ahead.
Can anyone help me with this?
thanks
Best Answer
Steps are creating module named
Naveed Abbas
whereNaveed
is your namespace andAbbas
module nameapp/etc/modules/Naveed_Abbas.xml
contents:
/Library/WebServer/Documents/bineli/app/code/local/Naveed/Abbas/etc/config.xml
create folders
Block
,Helper
,Model
,etc
in directoryapp/code/local/Naveed
andResource
folder inapp/code/local/Naveed/Model
and then
file
app/code/local/Naveed/Abbas/Model/Payment/Method/Cc.php