protected function call(Request $request) {
		$response = $request->execute();
		if (!$response->isSuccess()) {
			self::debug("Error in PayPal call", $response);			
			throw new PayPal_Exception_InvalidResponse("Error " . $response->status() . " in PayPal call (". $response->body() .")");
		}
		$res = json_decode($response->body());
		
		if (isset($res->error)) {
			self::error("Error in PayPal call: " . print_r($res, true));			
			throw new PayPal_Exception_InvalidResponse('PayPal: ' . $res->error_description . ' [' . $res->error . 
					'] while calling ' . $request->uri());
		}
		return $res;
	}
protected function call(Request $request) {
		$response = $request->execute();
		if (!$response->isSuccess()) {
			self::debug("Error in PayPal call", $response);			
			throw new PayPal_Exception_InvalidResponse("Error " . $response->status() . " in PayPal call (". $response->body() .")");
		}
		$res = json_decode($response->body());
		
		if (isset($res->error)) {
			self::error("Error in PayPal call: " . print_r($res, true));			
			throw new PayPal_Exception_InvalidResponse('PayPal: ' . $res->error_description . ' [' . $res->error . 
					'] while calling ' . $request->uri());
		}
		return $res;
	}
protected function call ( Request $ request ) { $ response = $ request -> execute ( ) ; if ( ! $ response -> isSuccess ( ) ) { self :: debug ( "Error in PayPal call" , $ response ) ; throw new PayPal_Exception_InvalidResponse ( "Error " . $ response -> status ( ) . " in PayPal call (" . $ response -> body ( ) . ")" ) ; } $ res = json_decode ( $ response -> body ( ) ) ; if ( isset ( $ res -> error ) ) { self :: error ( "Error in PayPal call: " . print_r ( $ res , true ) ) ; throw new PayPal_Exception_InvalidResponse ( 'PayPal: ' . $ res -> error_description . ' [' . $ res -> error . '] while calling ' . $ request -> uri ( ) ) ; } return $ res ; }
Execute a PayPal v1 API request
@param Request $request HTTP request to execute
@throws PayPal_Exception_InvalidResponse
@return mixed
Execute a PayPal v1 API request