I have a problem with magento order status, when i place an order with cc-avenue payment method, order status first assign as "Processing" and then "Pending". i am using citruspay payment gateway module.i have assigned "pending" as default order status in citruspay configuration from backend. can anybody help me where to change to get it resolved???


  • i want to know from where order is created or order status is changed when i click on place an order button?? – Keyur Patel Oct 1 '13 at 12:44

Magento has a default authorize which sets the state as processing.

You will have to edit/override the below file: code/core/Mage/Sales/Model/Order/Payment.php

protected function _authorize($isOnline, $amount)
    // update totals
    $amount = $this->_formatAmount($amount, true);

    // do authorization
    $order  = $this->getOrder();
    $state  = Mage_Sales_Model_Order::STATE_PROCESSING;
    $status = true;

Change the state to new or whatever you want to set when authorizing any payment from payment gateway.

  • Exactly what i was looking for... thanks shaily – Keyur Patel Apr 30 '14 at 9:22

Basically, there are two things as status and state for an order. The state we cannot make changes. It is used for internal developing purposes of Magento. But the status is acting as a label describing the current state of the order. In the admin panel, you can create order statuses and assign them to any state. Besides these from your module's config.xml file also you can do this state-status mapping. To resolve your issue,

1). Check admin panel how to order statuses are assigned to states. 2). Check your module's config.xml whether it contains any state related code.

  • by default the order status will be in processing state, so i want to change the default order status from processing to pending. the citrus pay module configuration is changing status from processing to pending.but i want default as pending. – Keyur Patel Oct 15 '13 at 9:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.