$this->assign('contactID', $this->_contactID);
CRM_Core_Resources::singleton()->addVars('coreForm', array('contact_id' => (int) $this->_contactID));
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
+ $this->_mode = CRM_Utils_Request::retrieve('mode', 'String', $this);
}
/**
public $_action = NULL;
public function preProcess() {
+
+ parent::preProcess();
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE);
$this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
$this->_component = CRM_Utils_Request::retrieve('component', 'String', $this, TRUE);
CRM_Core_Error::fatal(ts('No payment information found for this record'));
}
- //set the payment mode - _mode property is defined in parent class
- $this->_mode = CRM_Utils_Request::retrieve('mode', 'String', $this);
-
if (!empty($this->_mode) && $this->_paymentType == 'refund') {
CRM_Core_Error::fatal(ts('Credit card payment is not for Refund payments use'));
}
public function preProcess() {
// Check permission for action.
if (!CRM_Core_Permission::checkActionPermission('CiviContribute', $this->_action)) {
+ // @todo replace with throw new CRM_Core_Exception().
CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}