joeydsmith
2/2/2015 - 3:41 PM

gistfile1.txt

public function getConvioAuth() {
			$url = esc_attr( get_option('convio_api_url') ) . 'SRConsAPI';
			$atts = array(
						'method'          => 'getSingleSignOnToken',
						'api_key'         => esc_attr( get_option('convio_api_key') ),
						'login_name'      => esc_attr( get_option('convio_api_auth_user') ),
						'login_password'  => esc_attr( get_option('convio_api_auth_pw') ),
						'cons_id'		  => esc_attr( $_GET['cons_id'] ),
						'v'               => '1.0',
						'response_format' => 'json'
					);
			$response = $this->fetchUrl_POST( $url, $atts );
			if ( $response != '' ) {
				$response = json_decode($response);
				return $response->getSingleSignOnTokenResponse->token;
			}
		}