<?php include "citrix.php"; $citrix = new Citrix('7d4acae493336cd5ce1250ca777972bf'); $citrix->set_organizer_key('8551721408137636611'); $citrix->set_access_token('ec562df331a64de61e033b6852332b29'); try { echo "gets here"; $response = $citrix->citrixonline_create_registrant_of_webinar('7361625418674996736', $data = array('first_name' => 'Paul', 'last_name' => 'McCarthy', 'email' => '*****@*****.**')); echo $response; $citrix->pr($response); } catch (Exception $e) { $citrix->pr($e->getMessage()); }
<?php include "citrix.php"; $citrix = new Citrix('API Key'); $citrix->set_organizer_key('organizer_key'); $citrix->set_access_token('access_token'); try { $organizer_key = $citrix->get_organizer_key(); $citrix->pr($organizer_key); } catch (Exception $e) { $citrix->pr($e->getMessage()); } try { $webinars = $citrix->citrixonline_get_list_of_webinars(); $citrix->pr($webinars); } catch (Exception $e) { $citrix->pr($e->getMessage()); } try { $response = $citrix->citrixonline_create_registrant_of_webinar('webinar id', $data = array('first_name' => 'First Name', 'last_name' => 'Lastnmae', 'email' => '*****@*****.**')); $citrix->pr($response); } catch (Exception $e) { $citrix->pr($e->getMessage()); } try { $webinars = $citrix->get_registrants_of_webinars('webinar id'); $citrix->pr($webinars); } catch (Exception $e) { $citrix->pr($e->getMessage()); }
<?php include "citrix.php"; $citrix = new Citrix('7d4acae493336cd5ce1250ca777972bf'); $organizer_key = $citrix->get_organizer_key(); //$citrix->pr($organizer_key); if (!$organizer_key) { $url = $citrix->auth_citrixonline(); echo "<script type='text/javascript'>top.location.href = '{$url}';</script>"; exit; } $citrix->pr($citrix->get_organizer_key()); $citrix->pr($citrix->get_access_token());
function admin_setup() { // $this->admin_add_style_js('setup'); $ccontact_set = false; $ccontact_valid = false; if (isset($_GET['code']) && isset($_GET['username'])) { $ccontact_set = true; update_option('hc_constant_contact_username', $_GET['username']); update_option('hc_constant_contact_code', $_GET['code']); if (!class_exists("ConstantContact")) { require_once 'includes/apis/CTCT-OAuth2/ConstantContact.php'; } $apikey = get_option('hc_constantcontact_appkey'); $csecret = get_option('hc_constantcontact_appid'); $vUrl = admin_url() . "admin.php?page=hybridConnectAdminSetup"; $ccontact_valid = false; try { $oAuth2 = new CTCTOauth2($apikey, $csecret, $vUrl, $_GET["code"]); // trade your code in for an access token by doing a POST $token = $oAuth2->getAccessToken(); update_option('hc_constant_contact_token', $token); $ConstantContact = new ConstantContact("oauth2", $apikey, $_GET['username'], $token); if ($token && $token != '') { $ccontact_valid = true; } } catch (Exception $e) { $ccontact_valid = false; } } else { if (isset($_GET["code"]) && !isset($_GET["username"])) { // gotowebinar require_once 'includes/apis/g2w/citrix.php'; $citrix = new Citrix(get_option('hc_g2w_app_id')); $hcg2wError = false; try { $g2worganizerKey = $citrix->get_organizer_key(); update_option("hc_g2w_organizer_key", $g2worganizerKey); update_option("hc_g2w_error", ""); } catch (Exception $e) { update_option("hc_g2w_error", $citrix->pr($e->getMessage())); $hcg2wError = true; update_option("hc_g2w_valid", "false"); } try { $g2waccesssToken = $citrix->get_access_token(); update_option("hc_g2w_access_token", $g2waccesssToken); update_option("hc_g2w_error_2", ""); } catch (Exception $e) { update_option("hc_g2w_error_2", $citrix->pr($e->getMessage())); $hcg2wError = true; update_option("hc_g2w_valid", "false"); } if (get_option("hc_g2w_organizer_key") != "" && get_option("hc_g2w_access_token") != "") { update_option("hc_g2w_valid", "true"); } } } $my_services = $this->_get_services_array(); include 'includes/hc_admin_setup.php'; }