PayWithAmazon\IpnHandler::validateUrl PHP Method

validateUrl() private method

* Ensures that the URL of the certificate is one belonging to AWS.
private validateUrl ( $url )
$url Certificate URL
    private function validateUrl($url)
    {
        $parsed = parse_url($url);
        if (empty($parsed['scheme']) || empty($parsed['host']) || $parsed['scheme'] !== 'https' || substr($url, -4) !== '.pem' || !preg_match($this->defaultHostPattern, $parsed['host'])) {
            throw new \Exception('The certificate is located on an invalid domain.');
        }
    }