Magento Module: CIM Alternate Account

An extension of the popular Paradox Labs integration that provides alternate API account storage.


This module was developed to follow in-production, recurring orders while using a sandbox account. The merchant was using a highly customized Magento instance with unique order workflows. The third-party systems that were integrated did not provide adequate test environments. As a result, my team needed a way to track production orders in a test procedure.

As part of that effort, I was tasked with extending the existing CIM integration by Paradox Labs. The extension works by storing an alternate set of API keys, then selectively applying them at the time of transaction by checking the remote IP address against a configured whitelist.

For post-order activity (invoice, shipping), the alternate account is stored on the related payment record and again used to contact the payment gateway.


Configuring the payment method to support an alternate account.

Technical Features

Code Sample

protected function _loadOrCreateCard(Varien_Object $payment)

    if ($payment->getData('authnetcim_alt_account') == 1) {
        $this->setData('reference_flag', 1);
    } else if ( ($id = $payment->getOrder()->getCustomerId()) > 0 ) { // @todo future use
        $customer = Mage::getModel('customer/customer')

        if ($customer->getUseAuthnetAltAccount()) {
            $this->setData('reference_flag', 1);

    return parent::_loadOrCreateCard($payment);

Static Analysis