Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 816327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:48:47+00:00 2026-05-15T01:48:47+00:00

I am trying to add a new payment module into Magento. However, even after

  • 0

I am trying to add a new payment module into Magento. However, even after commenting out the vast majority of the code, I still get the following error:

Fatal error: Call to a member function isAvailable() on a non-object in /var/www/html/app/code/core/Mage/Payment/Helper/Data.php  on line 71

I am using Magento 1.4.0.1, and have disabled the cache. I even emptied the cache several times just in case.

The only code currently not commented out is based on the tutorials here and here.

The error occurs when the cart is loaded either from the administration area or the front end.

Is there anyone out there that has run into a similar issue? I would post code, but I am not sure what needs to be posted.

Thanks for the assistance.


Edit

app/etc/modules/CPAP_All.xml

<?xml version="1.0"?>
<config>
    <modules>
        <CPAP_AuthorizeCim>
            <active>true</active>
            <codePool>local</codePool>
        </CPAP_AuthorizeCim>
    </modules>
</config>

app/code/local/CPAP/AuthorizeCim/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <CPAP_AuthorizeCim>
            <version>0.1.0</version>
        </CPAP_AuthorizeCim>
    </modules>
    <global>
        <models>
            <authorizecim>
                <class>CPAP_AuthorizeCim_Model</class>
            </authorizecim>
        </models>
        <resources>
            <authorizecim_setup>
                <setup>
                    <module>CPAP_AuthorizeCim</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </authorizecim_setup>
            <authorizecim_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </authorizecim_write>
            <authorizecim_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </authorizecim_read>
        </resources>
    </global>
    <default>
        <payment>
            <authorizecim>
                <active>0</active>
                <model>authorizecim/paymentmethod</model>
                <order_status>pending</order_status>
                <cctypes>AE,VI,MC,DI</cctypes>
                <login backend_model="adminhtml/system_config_backend_encrypted"/>
                <trans_key backend_model="adminhtml/system_config_backend_encrypted"/>
                <payment_action>authorize</payment_action>
                <allowspecific>0</allowspecific>
            </authorizecim>
        </payment>
    </default>
</config>

app/code/local/CPAP/AuthorizeCim/Model/Paymentmethod.php

class CPAP_AuthorizeCim_Model_Authorizenet
{
}

If I comment out <model>authorizecim/paymentmethod</model> from the config.xml, then the error goes away, but my payment option will not display as an option in the cart.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:48:48+00:00Added an answer on May 15, 2026 at 1:48 am

    (Semi-appologies in advance for the self links in this post, but I seem to be (at least for now) the unofficial Magento developer’s guide)

    This is the code that’s causing you your problems (in the Data.php file mentioned above)

    if (!$model = Mage::getStoreConfig($prefix . 'model', $store)) {
        // Mage::Log('could not get model for ' . $prefix);
        continue;
    }
    
    $methodInstance = Mage::getModel($model);
    if (!$methodInstance->isAvailable($quote)) {
        // Mage::Log($model . ' is not avaiablable' );
        /* if the payment method can not be used at this time */
        continue;
    }
    

    Magento is seaching the system config for either a class name, or a URI style path to use in the call to getModel, which instantiates the model.

    $methodInstance = Mage::getModel('authorizecim/paymentmethod');
    

    So, your problem is that authorizecim/paymentmethod isn’t resolving to a Magento classname like it’s supposed to. (if you don’t follow this try the (Class/URI lookup tab in the Commerce Bug demo).

    So, authorizecim/paymentmethod is going to resolve to the classname

    CPAP_AuthorizeCim_Model_Paymentmethod
    
    authorizecim == look in config for this name in the <models /> section 
    and use it's value as a basename (CPAP_AuthorizeCim_Model)
    
    paymentmethod = append this with underscore word upper casing
    (Paymentmethod) and append to above string to give us 
    CPAP_AuthorizeCim_Model_Paymentmethod
    

    So, Magento tells PHP to instantiate a “CPAP_AuthorizeCim_Model_Paymentmethod”. However, this class isn’s loaded into memory, so the __autoload takes over and loads the file at

    CPAP/AuthorizeCim/Model/Paymentmethod.php
    

    Which is your PHP file, which brings us to your problem. Your class is named

    CPAP_AuthorizeCim_Model_Authorizenet
    

    when it needs to be named

    CPAP_AuthorizeCim_Model_Paymentmethod
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add new rows in my table, and save them into
I am trying to add new methods to an object dynamicaly. Following code works
I'm trying to add a new node to an jQuery SimpleTree , but all
I'm trying to add new output column using synchronous custom data flow component(below is
Hi I am trying to add new workitems to the TFS repository using the
I'm trying to add a new ADO.Net Entity Data Model to an MVC project
I'm trying to add new object to existing organisational unit in Active Directory. Following
I'm trying to add a new method to jQuery validation plugin with the codes
I am trying to add a new div to the page when you click
I'm trying add a tab to my web page that looks like this: Using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.