View Single Post
  #1  
Old 08-15-2012, 07:47 PM
m3dia m3dia is offline
Member
 
Join Date: Aug 2012
Posts: 13
Default 503 Error when using 3scale PHP Libraries

Using the libraries for 3scale here: https://github.com/3scale/3scale_ws_api_for_php

On Litespeed Web Server Standard v4.1.13, I'm getting a 503 Error when I try to use the libraries. Specifically when I run:

$response = $client->authorize($app_id_one, $app_key_one);

Here is the definition:

/**
* Authorize an application.
*
* @param $appId application id.
* @param $appKey secret application key.
* @param $serviceId service id, only required in the case of multiple services
*
* @return ThreeScaleResponse object containing additional authorization information.
* If both provider key and application id are valid, the returned object is actually
* @see ThreeScaleAuthorizeResponse (which is derived from ThreeScaleResponse) and
* contains additional information about the usage status.
*
* @see ThreeScaleResponse
* @see ThreeScaleAuthorizeResponse
*
* @throws ThreeScaleServerError in case of unexpected internal server error
*
* Example:
*
* <code>
* <?php
* $response = $client->authorize('app-id', 'app-key');
* // or $response = $client->authorize('app-id', 'app-key', 'service_id');
*
* if ($response->isSuccess()) {
* // ok.
* } else {
* // something is wrong.
* }
* ?>
* </code>
*/
public function authorize($appId, $appKey = null, $serviceId = null) {
$url = "http://" . $this->getHost() . "/transactions/authorize.xml";
$params = array('provider_key' => $this->getProviderKey(), 'app_id' => $appId);

if ($appKey) {
$params['app_key'] = $appKey;
}

if ($serviceId) {
$params['service_id'] = $serviceId;
}

$httpResponse = $this->httpClient->get($url, $params);

if (self::isHttpSuccess($httpResponse)) {
return $this->buildAuthorizeResponse($httpResponse->body);
} else {
return $this->processError($httpResponse);
}
}


Log export in next post! Please help! Thanks in advance!

m3dia
Reply With Quote