1

I've followed the following tutorial (part one and two) http://code.tutsplus.com/tutorials/create-a-custom-payment-method-module-in-magento-part-one--cms-23464

The payment is appearing correctly in the cms, but when I try using it on the website it doesn't appear. The system.log gives me the following error:

2015-09-28T14:06:36+00:00 ERR (3): Warning: include(Mage/Pay/Model/Pay.php): failed to open stream: No such file or directory in /var/www/html/magento/lib/Varien/Autoload.php on line 94 2015-09-28T14:06:36+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Pay/Model/Pay.php' for inclusion (include_path='/var/www/html/magento/app/code/local:/var/www/html/magento/app/code/community:/var/www/html/magento/app/code/core:/var/www/html/magento/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/magento/lib/Varien/Autoload.php on line 94

Even though there is no mention of the Pay model anywhere in the config files, only my custom model which is paymentmethod..

What am I missing or doing wrong?

Edit: config.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <Foomobi_Foopayment>
      <version>1.0.0.0</version>
    </Foomobi_Foopayment>
  </modules>

  <global>     
    <helpers>
      <foopayment>
        <class>Foomobi_Foopayment_Helper</class>
      </foopayment>
    </helpers>

    <blocks>
      <foopayment>
        <class>Foomobi_Foopayment_Block</class>
      </foopayment>
    </blocks>

    <models>
      <foopayment>
        <class>Foomobi_Foopayment_Model</class>
      </foopayment>
    </models>

  </global>

  <default>
    <payment>
      <foopayment>
        <active>1</active>
        <model>foopayment/foopayment</model>
        <order_status>pending</order_status>
        <title>CustomPaymentMethod</title>
        <allowspecific>0</allowspecific>
        <payment_action>sale</payment_action>
      </foopayment>
    </payment>
  </default>

  <frontend>
    <routers>
      <foopayment>
        <use>standard</use>
        <args>
          <module>Foomobi_Foopayment</module>
          <frontName>foopayment</frontName>
        </args>
      </foopayment>
    </routers>
  </frontend>
</config>
  • 1
    can you post in the question the config.xml of the module you created? – Marius Sep 28 '15 at 14:12
  • @Marius Sure thing. Done. – Pat Sep 28 '15 at 14:18
  • 2
    Your code has nothing to do with Mage/Pay/Model/Pay.php. are you sure this module is the problem? – Marius Sep 28 '15 at 14:20
  • That's what making me so confused. I suppose the error could be coming from another module, but then why won't my custom payment method show up on the website? – Pat Sep 28 '15 at 14:20
  • It seems I need to clear the cache. Which is weird because I've done that already before.. :/ – Pat Sep 28 '15 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.