0

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???

Thanks

1
  • i want to know from where order is created or order status is changed when i click on place an order button?? Commented Oct 1, 2013 at 12:44

2 Answers 2

2

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);
    $this->setBaseAmountAuthorized($amount);

    // 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.

1
  • Exactly what i was looking for... thanks shaily Commented Apr 30, 2014 at 9:22
2

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.

1
  • 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. Commented Oct 15, 2013 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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