Пример #1
0
 /**
  * Delete payment
  *
  * @return  void
  */
 public function deletePayment()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $ids = $input->get('cid', array(), 'array');
     foreach ($ids as $id) {
         $status = RApiPaymentHelper::deletePayment($id);
         if ($status) {
             $app->enqueueMessage(JText::_('COM_REDCORE_PAYMENT_DELETE_PAYMENT_SUCCESS'));
         } else {
             $lastLog = RApiPaymentHelper::getLastPaymentLog($id);
             $app->enqueueMessage(JText::sprintf('COM_REDCORE_PAYMENT_DELETE_PAYMENT_FAILED', $lastLog->message_text), 'error');
         }
     }
     // Redirect to the list screen
     $this->setRedirect($this->getRedirectToListRoute($this->getRedirectToListAppend()));
 }