cancel
Showing results for 
Search instead for 
Did you mean: 

Payment method: logo and description: Mage_Core_Exception with message Invalid block type

Payment method: logo and description: Mage_Core_Exception with message Invalid block type

HI, I am trying to insert a logo and a description in a payment method at the chekout page and I am getting this error:

 

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Easypaycc_Block_Standard_Form' in /public_html/magento/1.8/app/Mage.php:594
Stack trace:
#0 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('easypaycc/stand...', Array)
#2 /public_html/magento/1.8/app/code/core/Mage/Payment/Helper/Data.php(105): Mage_Core_Model_Layout->createBlock('easypaycc/stand...')
#3 /public_html/magento/1.8/app/code/core/Mage/Payment/Block/Form/Container.php(49): Mage_Payment_Helper_Data->getMethodFormBlock(Object(Multibase_Easypaycc_Model_Standard))
#4 /public_html/magento/1.8/app/code/core/Mage/Core/Block/Abstract.php(261): Mage_Payment_Block_Form_Container->_prepareLayout()
#5 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#6 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('checkout/onepag...', 'checkout.paymen...')
#7 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('checkout/onepag...', 'checkout.paymen...')
#8 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#9 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#10 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#11 /public_html/magento/1.8/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /public_html/magento/1.8/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#13 /public_html/magento/1.8/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /public_html/magento/1.8/app/code/core/Mage/Checkout/controllers/OnepageController.php(212): Mage_Core_Controller_Varien_Action->loadLayout()
#15 /public_html/magento/1.8/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->indexAction()
#16 /public_html/magento/1.8/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#17 /public_html/magento/1.8/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /public_html/magento/1.8/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /public_html/magento/1.8/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /public_html/magento/1.8/index.php(87): Mage::run('', 'store')
#21 {main}

 

What can be wrong?

Each time I activate the line 

protected $_formBlockType = 'easypaycc/standard_form';

at the Model/Standard.php I got this error.

 

 

Thank in advance.

 

---

 

This is the config definition for the layout:

<layout>
        <updates>
		    <easypaycc>
			    <file>multibase_easypaycc.xml</file>
	    	</easypaycc>
        </updates>
    </layout>

This is the Multibase_Easyaycc.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Multibase_Easypaycc>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Payment />
            </depends>
        </Multibase_Easypaycc>
    </modules>
</config>

This is the Model/Standard.php

class Multibase_Easypaycc_Model_Standard extends Mage_Payment_Model_Method_Abstract {
	protected $_code = 'easpaycc_standard';

	protected $_isInitializeNeeded      = true;
	protected $_canUseInternal          = true;
	protected $_canUseForMultishipping  = false;

	protected $_formBlockType = 'easypaycc/standard_form';

	public function getOrderPlaceRedirectUrl() {

		$baseCurrency = Mage::app()->getStore()->getBaseCurrencyCode();

		if( $baseCurrency == 'EUR'){
			$this->isAvailable = true;
		}else{
			$this->isAvailable = false;
		}

		return Mage::getUrl('easpaycc/payment/redirect', array('_secure' => true));
	}

	public function createFormBlock($name)
	{
		$block = $this->getLayout()->createBlock('easypaycc/standard_form', $name)
		->setMethod('easypaycc_standard')
		->setPayment($this->getPayment())
		->setTemplate('easypaycc/standard/form.phtml');

		return $block;
	}

	/*validate the currency code is avaialable to use for indexa_pagamentodigital or not*/
	public function validate()
	{
		parent::validate();
		return $this;
	}

	public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
	{
		return $this;
	}

	public function onInvoiceCreate(Mage_Sales_Model_Invoice_Payment $payment)
	{
		return $this;
	}

	public function canCapture()
	{
		return true;
	}

}
?>

 

This is the Form.php class

class Multibase_Easypaycc_Block_Standard_Form extends Mage_Payment_Block_Form
{
    protected function _construct()
    {
        $this->setTemplate('multibase_easypaycc/standard/form.phtml');
        parent::_construct();
    }
}