If you wish to change an Order Status to ” Payment Accepted ” you can use this code:
$id_order=Tools::getValue(‘id_order’);
$order=new Order($id_order);
/* here we validate the order*/
$history = new OrderHistory();
$history->id_order = (int)$order->id;
$history->changeIdOrderState(2, (int)($order->id)); //order status=2 Payment Accepted
The status of 2 means ” Payment Accepted”
You can apply this code to other statuses as well
Here is a list of order statuses and there corresponding id:
Status of ” 10″ means “Awaiting bank wire payment”
Status of “13” means “Awaiting Cash On Delivery validation”
Status of “1” means “Awaiting check payment”
Status of “6” means “Canceled”
Status of “5” means “Delivered”
Status of “12” means “On backorder (not paid)”
Status of “9” means “On backorder (paid)”
Status of “2” means “Payment accepted”
Status of “8” means “Payment error”
Status of “3” means “Processing in progress”
Status of “7” means “Refunded”
Status of “11” means ” Remote payment accepted”
Status of “4” means “Shipped”