public function subscribe($data)
 {
     // get settings
     global $WishListMemberInstance;
     $webinars = $WishListMemberInstance->GetOption('webinar');
     $settings = $webinars[$this->slug];
     $webinar4 = explode('---', $settings[$data['level']]);
     if (empty($settings)) {
         return;
     }
     $obj = new OAuth_En();
     $oauth = new OAuth($obj);
     $vars['firstName'] = $data['first_name'];
     $vars['lastName'] = $data['last_name'];
     $vars['email'] = $data['email'];
     $obj->setOrganizerKey($settings['organizerkey']);
     $obj->setAccessToken($settings['accesstoken']);
     $oauth->setWebinarId($webinar4[0]);
     $oauth->setRegistrantInfo($vars);
     $oauth->createRegistrant();
 }
            //if there's no error on api call, we save the access token and organizer key
            if (!$oauth->hasApiError()) {
                $_POST['webinar']['accesstoken'] = $obj->getAccessToken();
                $_POST['webinar']['organizerkey'] = $obj->getOrganizerKey();
                $_POST['webinar']['authorizationcode'] = trim($_POST['txtauthorizationcode2']);
                $webinar_settings[$webinar_provider] = $_POST['webinar'];
                $this->SaveOption('webinar', $webinar_settings);
                $webinar_settings = $this->GetOption('webinar');
                $webinars3 = $webinar_settings['gotomeetingapi'];
                $objOAuthEn = $oauth->getOAuthEntityClone();
                $webinars = $oauth->getWebinars();
            } else {
                echo '<font color="red" size="6px">Sorry, incorrect Authorization Code</font>';
            }
        } else {
            $obj->setAccessToken($webinars3['accesstoken']);
            $obj->setOrganizerKey($webinars3['organizerkey']);
            $webinars = $oauth->getWebinars();
        }
    } else {
        $obj->setAccessToken($webinars3['accesstoken']);
        $obj->setOrganizerKey($webinars3['organizerkey']);
        $webinars = $oauth->getWebinars();
    }
}
if (!$oauth->hasApiError()) {
    ?>
<h2 class="wlm-integration-steps">Step 1: Obtain GoToWebinar API Authorization Code</h2>
<p><a target="_blank" href="<?php 
    echo 'https://api.citrixonline.com/oauth/authorize?client_id=' . GOTO_WEBINAR_API_KEY . '&redirect_uri=http://wishlist-member.s3.amazonaws.com/gotowebinar/index.html';
    ?>