PayPal\Ipn\PPIPNMessage::__construct PHP Method

__construct() public method

public __construct ( string $postData = '', $config = null )
$postData string OPTIONAL post data. If null, the class automatically reads incoming POST data from the input stream
    public function __construct($postData = '', $config = null)
    {
        $this->config = PPConfigManager::getConfigWithDefaults($config);
        if ($postData == '') {
            // reading posted data from directly from $_POST may causes serialization issues with array data in POST
            // reading raw POST data from input stream instead.
            $postData = file_get_contents('php://input');
        }
        $rawPostArray = explode('&', $postData);
        foreach ($rawPostArray as $keyValue) {
            $keyValue = explode('=', $keyValue);
            if (count($keyValue) == 2) {
                $this->ipnData[$keyValue[0]] = urldecode($keyValue[1]);
            }
        }
        //var_dump($this->ipnData);
    }