cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, problem with sales order invoice save

Hello, problem with sales order invoice save

Hello, I try put on the config.xml an events.
Example:

<events>
            <sales_order_save_after>
                <observers>
                    <mag_payment>
                        <class>Mag_Payment/observer</class>
                        <method>autoInvoice</method>
                    </mag_payment>
                </observers>
            </sales_order_save_after>
        </events>

 

and Model/Observer.php

class Mag_Payment_Model_Observer {
    public $_invoice;
   
    public function autoInvoice($observer) {

return true;

}

}

 

But, when I pay the order, there show me this error. "There was an error processing your order. Please contact us or try again later."

Somebody know, what is the problem?