Scenario:
I have enabled Authorize.net payment method but it is not displayed in Payment Information section while Checkout.
Problem:
In the class Mage_Paygate_Model_Authorizenet, you will find the following variable:-
protected $_allowCurrencyCode = array('USD');
It means, the allowed currency for Authorize.net is only US Dollar (USD). You have to add the currency code to the above array in order to display Authorize.net payment for that particular currency.
Solution:
Suppose, I like to display Authorize.net in my shop where the currency is Nepalese Rupees (NPR). Then, I have to change the variable as below:
protected $_allowCurrencyCode = array('USD', 'NPR');
Similarly, we must add more values to the array for more currencies.
It’s a better practice to override core files instead of modifying them directly. By overiding, we will have the facility to change core files without touching them. So, here I am going to override the model class Mage_Paygate_Model_Authorizenet.
<global>
<models>
<paygate>
<rewrite>
<authorizenet>MyNamespace_MyModule_Model_Paygate_Authorizenet</authorizenet>
</rewrite>
</paygate>
</models>
</global>
My Model file will be:-
class MyNamespace_MyModule_Model_Paygate_Authorizenet extends Mage_Paygate_Model_Authorizenet
{
protected $_allowCurrencyCode = array('USD', 'NPR');
}
Hope this helps. Thanks.