I’ve seen this question asked with regard to currency type, but what I am asking is how to configure a second Authorize.net account on the same store for a different credit card type. So, we want some credit cards to use the first main Authorize.net gateway, but the others to use the secondary Authorize.net account so that the payments can be routed into two different bank accounts. This is for purposes of reconciliation and is a constraint; can’t be modified.
I’m figuring that all I need to do is figure out once the order has been submitted (but before it has been sent via API to Authorize.net) which card type it is, to know which credentials to pass to the API, but I’m unsure as to where to add this code, or the best way in which to add it.
Any insight or advice would be greatly appreciated.
By default, there is no way to accomplish this, so you’ll need to use some custom code. Specifically, override the Authnet payment class
Mage_Paygate_Model_Authorizenet:In that function, on line 277 for me, the following code is executed to set the Authnet account:
Instead, you want something along these lines:
To accomplish this, you’ll also want to create new options in the backend to hold the credentials in an encrypted form. Hope that helps!
Thanks,
Joe