public function changePaymentStateAction(Request $request, OrderInterface $order, $transition) { $stateLineStack = $this->get('elcodi.order_payment_states_machine_manager')->transition($order, $order->getPaymentStateLineStack(), $transition, ''); $order->setPaymentStateLineStack($stateLineStack); $this->flush($order); return $this->redirect($request->headers->get('referer')); }