problem in magento default order status changes
-
16-10-2019 - |
Question
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
Solution
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.
OTHER TIPS
Basically there are two things as status
and state
for a order. The state
we cannot make changes. It is used for internal developing purposes of Magento. But the status is act as a label which describing the current state of the order. In 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 order statuses are assigned to states.
2). Check your modules config.xml
whether it contains any state related code.