cancel
Showing results for 
Search instead for 
Did you mean: 

Paypal status

Paypal status

Hi,

 

using Magento 1.9.1.0. I did write an observer, after the order is placed I need to send data to an external CRM, I used the event sales_order_save_after. In order to know if the order has been paid, I check the order status: when using paypal, the execution of my observer is made 2 times, both with order status processing. My guess is Magento puts the order in processing status immediately when I'm been redirected to paypal.

 

Is there a way to have different order status in this case?

 

Thanks

5 REPLIES

Re: Paypal status

Any solution ?

Re: Paypal status

@sistemihoop

 

You can use the sales_order_state_change_before event which provides access to the order and check if the payment was processed or not. So, when the payment is processed, it will be fired again, which will allow you to manage the order processing status along with payment method.

-- Ravindra

Re: Paypal status

But directly from the paypal source you can do ?

Re: Paypal status

You can update the order status after the paypal payment through the following event. No need to call any other even if not really required

 

 <checkout_onepage_controller_success_action>
            <observers>
              <Your_Module_Name>
                <class>your_module_name/observer</class>
                        <method>automaticallyInvoiceShipCompleteOrder</method>
                        <type>singleton</type>
              </Your_Module_Name>
             </observers>
            </checkout_onepage_controller_success_action>
-- Ravindra

Re: Paypal status

thanks, possible that though paypal can not be done?