'Verifies that the URL of the verification is what we expect.
:param domain: the domain you expect the receipt to be verified at,
note that "real" receipts are verified at a different domain
from the main marketplace domain.'

def check_url(self, domain):

    path = self.environ['PATH_INFO']
    parsed = urlparse(self.decoded.get('verify', ''))
    if (parsed.netloc != domain):
        log_info('Receipt    had    invalid    domain')
        raise InvalidReceipt('WRONG_DOMAIN')
    if (parsed.path != path):
        log_info('Receipt    had    the    wrong    path')
        raise InvalidReceipt('WRONG_PATH')
