PayWithAmazon\IpnHandler::toArray PHP Method

toArray() public method

* toArray() - Converts IPN [Message] field to associative array
public toArray ( )
    public function toArray()
    {
        $response = $this->simpleXmlObject();
        // Converting the SimpleXMLElement Object to array()
        $response = json_encode($response);
        $response = json_decode($response, true);
        // Merging the remaining fields with the response array
        $remainingFields = $this->getRemainingIpnFields();
        $response = array_merge($remainingFields, $response);
        return $response;
    }