public function deletepaymentAction() { $request = $this->getRequest(); if (isset($request->id) && is_numeric($request->id)) { // Get the order id attached to the payment transaction $orderId = Payments::getOrderId($request->id); if (is_numeric($orderId)) { // Delete the payment transaction if (Payments::deleteByID($request->id)) { $this->_helper->redirector('edit', 'orders', 'admin', array('id' => $orderId, 'mex' => 'The task requested has been executed successfully.', 'status' => 'success')); } else { $this->_helper->redirector('edit', 'orders', 'admin', array('id' => $orderId, 'mex' => $this->translator->translate('There was a problem'), 'status' => 'danger')); } } } $this->_helper->redirector('list', 'orders', 'admin'); }