private function PPHttpPost($methodName_, $nvpStr_) {

		// Set up your API credentials, PayPal end point, and API version.
		$API_UserName = urlencode($this->Username);
		$API_Password = urlencode($this->Password);
		$API_Signature = urlencode($this->Signature);
		$API_Endpoint = "https://api-3t.paypal.com/nvp";

		if ("sandbox" === $this->environment || "beta-sandbox" === $this->environment)
		{
			$API_Endpoint = "https://api-3t." . $this->environment . ".paypal.com/nvp";
		}

		//$version = urlencode('51.0');
		$version = urlencode('62.0');

		// Set the curl parameters.
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
		curl_setopt($ch, CURLOPT_VERBOSE, 1);

		// Turn off the server and peer verification (TrustManager Concept).
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_POST, 1);

		// Set the API operation, version, and API signature in the request.
		$nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_";

		// Set the request as a POST FIELD for curl.
		curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);

		// Get response from the server.
		$httpResponse = curl_exec($ch);

		if(!$httpResponse) {
			throw new Exception("$methodName_ failed: ".curl_error($ch).'('.curl_errno($ch).')');
		}

		// Extract the response details.
		$httpResponseAr = explode("&", $httpResponse);

		$httpParsedResponseAr = array();
		foreach ($httpResponseAr as $i => $value) {
			$tmpAr = explode("=", $value);
			if(sizeof($tmpAr) > 1) {
				$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];
			}
		}

		if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {
			throw new Exception("Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.");
		}

		return $httpParsedResponseAr;
	}
private function PPHttpPost($methodName_, $nvpStr_) {

		// Set up your API credentials, PayPal end point, and API version.
		$API_UserName = urlencode($this->Username);
		$API_Password = urlencode($this->Password);
		$API_Signature = urlencode($this->Signature);
		$API_Endpoint = "https://api-3t.paypal.com/nvp";

		if ("sandbox" === $this->environment || "beta-sandbox" === $this->environment)
		{
			$API_Endpoint = "https://api-3t." . $this->environment . ".paypal.com/nvp";
		}

		//$version = urlencode('51.0');
		$version = urlencode('62.0');

		// Set the curl parameters.
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
		curl_setopt($ch, CURLOPT_VERBOSE, 1);

		// Turn off the server and peer verification (TrustManager Concept).
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_POST, 1);

		// Set the API operation, version, and API signature in the request.
		$nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_";

		// Set the request as a POST FIELD for curl.
		curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);

		// Get response from the server.
		$httpResponse = curl_exec($ch);

		if(!$httpResponse) {
			throw new Exception("$methodName_ failed: ".curl_error($ch).'('.curl_errno($ch).')');
		}

		// Extract the response details.
		$httpResponseAr = explode("&", $httpResponse);

		$httpParsedResponseAr = array();
		foreach ($httpResponseAr as $i => $value) {
			$tmpAr = explode("=", $value);
			if(sizeof($tmpAr) > 1) {
				$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];
			}
		}

		if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {
			throw new Exception("Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.");
		}

		return $httpParsedResponseAr;
	}
private function PPHttpPost ( $ methodName_ , $ nvpStr_ ) { // Set up your API credentials, PayPal end point, and API version. $ API_UserName = urlencode ( $ this -> Username ) ; $ API_Password = urlencode ( $ this -> Password ) ; $ API_Signature = urlencode ( $ this -> Signature ) ; $ API_Endpoint = "https://api-3t.paypal.com/nvp" ; if ( "sandbox" === $ this -> environment || "beta-sandbox" === $ this -> environment ) { $ API_Endpoint = "https://api-3t." . $ this -> environment . ".paypal.com/nvp" ; } //$version = urlencode('51.0'); $ version = urlencode ( '62.0' ) ; // Set the curl parameters. $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ API_Endpoint ) ; curl_setopt ( $ ch , CURLOPT_VERBOSE , 1 ) ; // Turn off the server and peer verification (TrustManager Concept). curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , FALSE ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYHOST , FALSE ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; // Set the API operation, version, and API signature in the request. $ nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_" ; // Set the request as a POST FIELD for curl. curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ nvpreq ) ; // Get response from the server. $ httpResponse = curl_exec ( $ ch ) ; if ( ! $ httpResponse ) { throw new Exception ( "$methodName_ failed: " . curl_error ( $ ch ) . '(' . curl_errno ( $ ch ) . ')' ) ; } // Extract the response details. $ httpResponseAr = explode ( "&" , $ httpResponse ) ; $ httpParsedResponseAr = array ( ) ; foreach ( $ httpResponseAr as $ i => $ value ) { $ tmpAr = explode ( "=" , $ value ) ; if ( sizeof ( $ tmpAr ) > 1 ) { $ httpParsedResponseAr [ $ tmpAr [ 0 ] ] = $ tmpAr [ 1 ] ; } } if ( ( 0 == sizeof ( $ httpParsedResponseAr ) ) || ! array_key_exists ( 'ACK' , $ httpParsedResponseAr ) ) { throw new Exception ( "Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint." ) ; } return $ httpParsedResponseAr ; }
Send HTTP POST Request.  Throws an Exception if the server communication failed

@param	string	The API method name
@param	string	The POST Message fields in &name=value pair format
@return	array	Parsed HTTP Response body
Send HTTP POST Request . Throws an Exception if the server communication failed