By default, there is no way for this, so you will need to use some kind of custom code. In particular, override the Authnet billing class Mage_Paygate_Model_Authorizenet:
class MyNamespace_MyModule_Model_Authorizenet extends Mage_Paygate_Model_Authorizenet {
protected function _buildRequest(Varien_Object $payment)
//see below
}
}
In this function, for line 277, the following code is executed for me to set up an Authnet account:
$request->setXLogin($this->getConfigData('login'))
->setXTranKey($this->getConfigData('trans_key'))
->setXType($payment->getAnetTransType())
->setXMethod($payment->getAnetTransMethod());
Instead, you need something in this direction:
if(whatever cc type) {
// set alternate gateway
} else {
// set default gateway
}
For this, you will also want to create new parameters in the backend for storing credentials in encrypted form. Hope this helps!
Thanks Joe
source
share