Created
February 2, 2015 15:41
-
-
Save joeydsmith/6b759569cc99e46b1312 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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