function validate_constant_contact_credentials($username, $password) { require_once PREMISE_LIB_DIR . 'constant_contact_api/constant_contact_api.php'; $this->setup_constant_contact($this->_optin_ConstantContactKey, $username, $password); $utility = new CCUtility(); $result = $utility->ping(); if (!empty($result['error'])) { return array('error' => __('Invalid Constant Contact credentials.', 'premise')); } return true; }
/** * Public function that gets event details of a single event object passed to it. * * @param object $registrant - a valid registrant object with a valid registrant link * @return object $registrant - returns registrant object with full details */ public function listRegistrantDetails($registrant) { $utility = new CCUtility(); $call = $utility->getApiPath() . $registrant->getLink(); $return = $utility->httpGet($call); $registrant = $this->createRegistrantStruct($return['xml']); if (!$return) { return false; } else { return $registrant; } }