/** Change Custom Payment Status */
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
$order->setData('state', 'complete');
$order->setStatus('complete');
$history = $order->addStatusHistoryComment('Order was set to Complete by our automation tool.', false);
$history->setIsCustomerNotified(true);
$order->save();
/* End payment status */
Enjoy script! :) How to change order information on success order: Magento
Hello Friends!
Hope you all are doing well!
I am here going to describe you a important Magento script for change the order information on success order.
Using my script, you can easily update recent order information like "customer group", "payment status", "order confirmation" etc.

