Skip to content

Instantly share code, notes, and snippets.

@joeydsmith
Created February 2, 2015 15:41
Show Gist options
  • Save joeydsmith/6b759569cc99e46b1312 to your computer and use it in GitHub Desktop.
Save joeydsmith/6b759569cc99e46b1312 to your computer and use it in GitHub Desktop.
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment