{
    "id": 35,
    "date": "2024-10-26T22:25:43",
    "date_gmt": "2024-10-26T22:25:43",
    "guid": {
        "rendered": "https:\/\/m7lauhbiqx.onrocket.site\/?page_id=303"
    },
    "modified": "2024-10-26T22:25:43",
    "modified_gmt": "2024-10-26T22:25:43",
    "slug": "qr-scan",
    "status": "publish",
    "type": "page",
    "link": "https:\/\/biznestco.com\/en\/qr-scan\/",
    "title": {
        "rendered": "QR Scan"
    },
    "content": {
        "rendered": "<div class=\"ticket-verification-container\">\n\n            <div id=\"verification-result\" class=\"ticket-verification-result\">\n                            <\/div>\n            <div id=\"scanner-container\" style=\"display: none;\">\n                <video id=\"qr-video\" style=\"width: 100%; max-width: 500px;\"><\/video>\n                <canvas id=\"qr-canvas\" style=\"display: none;\"><\/canvas>\n            <\/div>\n            <a href=\"#\" class=\"qr-code-scan-btn\" id=\"start-scanner\">\n                <img decoding=\"async\" src=\"https:\/\/biznestco.com\/wp-content\/plugins\/listeo-core\/assets\/images\/listeo_qr.svg\" \/>\n                <span>Click to Open QR Code Scanner<\/span>\n            <\/a>\n\n            <div id=\"debug-info\" style=\"display:none; margin-top: 20px; padding: 10px; background-color: #f0f0f0;\"><\/div>\n        <\/div>\n\n        <script src=\"https:\/\/cdn.jsdelivr.net\/npm\/jsqr@1.3.1\/dist\/jsQR.min.js\"><\/script>\n        <script>\n            document.addEventListener('DOMContentLoaded', function() {\n                const video = document.getElementById('qr-video');\n                const canvas = document.getElementById('qr-canvas');\n                const ctx = canvas.getContext('2d');\n                const startButton = document.getElementById('start-scanner');\n                const scannerContainer = document.getElementById('scanner-container');\n                const resultDiv = document.getElementById('verification-result');\n\n                const debugInfo = document.getElementById('debug-info');\n                let scanning = false;\n                let stream = null;\n\n                function log(message) {\n                    console.log(message);\n                    debugInfo.innerHTML += message + '<br>';\n                }\n\n                startButton.addEventListener('click', function() {\n                    if (scanning) {\n                        stopScanner();\n                    } else {\n                        startScanner();\n                    }\n                });\n\n                function startScanner() {\n                    if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {\n                        log('Sorry, your browser doesn\\'t support accessing the camera.');\n                        return;\n                    }\n\n                    navigator.mediaDevices.getUserMedia({\n                            video: {\n                                facingMode: \"environment\"\n                            }\n                        })\n                        .then(function(mediaStream) {\n                            log('Camera access granted');\n                            scanning = true;\n                            stream = mediaStream;\n                            startButton.textContent = 'Stop Scanner';\n                            scannerContainer.style.display = 'block';\n                            video.srcObject = stream;\n                            video.setAttribute(\"playsinline\", true);\n                            video.play();\n                            requestAnimationFrame(tick);\n                        })\n                        .catch(function(err) {\n                            log('Error accessing the camera: ' + err.message);\n                        });\n                }\n\n                function stopScanner() {\n                    log('Stopping scanner');\n                    scanning = false;\n                    startButton.textContent = 'Start Scanner';\n                    scannerContainer.style.display = 'none';\n                    if (stream) {\n                        stream.getTracks().forEach(track => track.stop());\n                        stream = null;\n                    }\n                    video.srcObject = null;\n                }\n\n                function tick() {\n                    if (scanning) {\n                        if (video.readyState === video.HAVE_ENOUGH_DATA) {\n                            canvas.height = video.videoHeight;\n                            canvas.width = video.videoWidth;\n                            ctx.drawImage(video, 0, 0, canvas.width, canvas.height);\n                            var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                            var code = jsQR(imageData.data, imageData.width, imageData.height, {\n                                inversionAttempts: \"dontInvert\",\n                            });\n                            if (code) {\n                                log(\"Found QR code: \" + code.data);\n                                stopScanner();\n                                window.location.href = code.data; \/\/ Automatically redirect to the URL in the QR code\n                            }\n                        }\n                        requestAnimationFrame(tick);\n                    }\n                }\n\n                function verifyTicket(url) {\n                    const verifyParam = new URL(url).searchParams.get('verify');\n                    if (verifyParam) {\n                        log('Verifying ticket: ' + verifyParam);\n                        window.location.href = url; \/\/ Redirect to the verification URL\n                    } else {\n                        resultDiv.innerHTML = '<p>Invalid QR code. Please try again.<\/p>';\n                    }\n                }\n\n                window.addEventListener('unload', stopScanner);\n            });\n        <\/script>\n        \n\n\n\n<p><\/p>",
        "protected": false
    },
    "excerpt": {
        "rendered": "",
        "protected": false
    },
    "author": 1,
    "featured_media": 0,
    "parent": 0,
    "menu_order": 0,
    "comment_status": "closed",
    "ping_status": "closed",
    "template": "template-dashboard.php",
    "meta": {
        "footnotes": ""
    },
    "class_list": [
        "post-35",
        "page",
        "type-page",
        "status-publish",
        "hentry"
    ],
    "yoast_head": "<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>QR Scan - Biznest<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/biznestco.com\/en\/qr-scan\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QR Scan - Biznest\" \/>\n<meta property=\"og:url\" content=\"https:\/\/biznestco.com\/en\/qr-scan\/\" \/>\n<meta property=\"og:site_name\" content=\"Biznest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/biznestco.com\\\/qr-scan\\\/\",\"url\":\"https:\\\/\\\/biznestco.com\\\/qr-scan\\\/\",\"name\":\"QR Scan - Biznest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/biznestco.com\\\/#website\"},\"datePublished\":\"2024-10-26T22:25:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/biznestco.com\\\/qr-scan\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/biznestco.com\\\/qr-scan\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/biznestco.com\\\/qr-scan\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/biznestco.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"QR Scan\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/biznestco.com\\\/#website\",\"url\":\"https:\\\/\\\/biznestco.com\\\/\",\"name\":\"Biznest\",\"description\":\"Your Local Compass\",\"publisher\":{\"@id\":\"https:\\\/\\\/biznestco.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/biznestco.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/biznestco.com\\\/#organization\",\"name\":\"Biznest\",\"url\":\"https:\\\/\\\/biznestco.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/biznestco.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/biznestco.com\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/logo-and-color-palette-03-scaled.png\",\"contentUrl\":\"https:\\\/\\\/biznestco.com\\\/wp-content\\\/uploads\\\/2025\\\/08\\\/logo-and-color-palette-03-scaled.png\",\"width\":2560,\"height\":2560,\"caption\":\"Biznest\"},\"image\":{\"@id\":\"https:\\\/\\\/biznestco.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->",
    "yoast_head_json": {
        "title": "QR Scan - Biznest",
        "robots": {
            "index": "index",
            "follow": "follow",
            "max-snippet": "max-snippet:-1",
            "max-image-preview": "max-image-preview:large",
            "max-video-preview": "max-video-preview:-1"
        },
        "canonical": "https:\/\/biznestco.com\/en\/qr-scan\/",
        "og_locale": "en_US",
        "og_type": "article",
        "og_title": "QR Scan - Biznest",
        "og_url": "https:\/\/biznestco.com\/en\/qr-scan\/",
        "og_site_name": "Biznest",
        "twitter_card": "summary_large_image",
        "schema": {
            "@context": "https:\/\/schema.org",
            "@graph": [
                {
                    "@type": "WebPage",
                    "@id": "https:\/\/biznestco.com\/qr-scan\/",
                    "url": "https:\/\/biznestco.com\/qr-scan\/",
                    "name": "QR Scan - Biznest",
                    "isPartOf": {
                        "@id": "https:\/\/biznestco.com\/#website"
                    },
                    "datePublished": "2024-10-26T22:25:43+00:00",
                    "breadcrumb": {
                        "@id": "https:\/\/biznestco.com\/qr-scan\/#breadcrumb"
                    },
                    "inLanguage": "en-US",
                    "potentialAction": [
                        {
                            "@type": "ReadAction",
                            "target": [
                                "https:\/\/biznestco.com\/qr-scan\/"
                            ]
                        }
                    ]
                },
                {
                    "@type": "BreadcrumbList",
                    "@id": "https:\/\/biznestco.com\/qr-scan\/#breadcrumb",
                    "itemListElement": [
                        {
                            "@type": "ListItem",
                            "position": 1,
                            "name": "Home",
                            "item": "https:\/\/biznestco.com\/"
                        },
                        {
                            "@type": "ListItem",
                            "position": 2,
                            "name": "QR Scan"
                        }
                    ]
                },
                {
                    "@type": "WebSite",
                    "@id": "https:\/\/biznestco.com\/#website",
                    "url": "https:\/\/biznestco.com\/",
                    "name": "Biznest",
                    "description": "Your Local Compass",
                    "publisher": {
                        "@id": "https:\/\/biznestco.com\/#organization"
                    },
                    "potentialAction": [
                        {
                            "@type": "SearchAction",
                            "target": {
                                "@type": "EntryPoint",
                                "urlTemplate": "https:\/\/biznestco.com\/?s={search_term_string}"
                            },
                            "query-input": {
                                "@type": "PropertyValueSpecification",
                                "valueRequired": true,
                                "valueName": "search_term_string"
                            }
                        }
                    ],
                    "inLanguage": "en-US"
                },
                {
                    "@type": "Organization",
                    "@id": "https:\/\/biznestco.com\/#organization",
                    "name": "Biznest",
                    "url": "https:\/\/biznestco.com\/",
                    "logo": {
                        "@type": "ImageObject",
                        "inLanguage": "en-US",
                        "@id": "https:\/\/biznestco.com\/#\/schema\/logo\/image\/",
                        "url": "https:\/\/biznestco.com\/wp-content\/uploads\/2025\/08\/logo-and-color-palette-03-scaled.png",
                        "contentUrl": "https:\/\/biznestco.com\/wp-content\/uploads\/2025\/08\/logo-and-color-palette-03-scaled.png",
                        "width": 2560,
                        "height": 2560,
                        "caption": "Biznest"
                    },
                    "image": {
                        "@id": "https:\/\/biznestco.com\/#\/schema\/logo\/image\/"
                    }
                }
            ]
        }
    },
    "_links": {
        "self": [
            {
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/pages\/35",
                "targetHints": {
                    "allow": [
                        "GET"
                    ]
                }
            }
        ],
        "collection": [
            {
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/pages"
            }
        ],
        "about": [
            {
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/types\/page"
            }
        ],
        "author": [
            {
                "embeddable": true,
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/users\/1"
            }
        ],
        "replies": [
            {
                "embeddable": true,
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/comments?post=35"
            }
        ],
        "version-history": [
            {
                "count": 0,
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/pages\/35\/revisions"
            }
        ],
        "wp:attachment": [
            {
                "href": "https:\/\/biznestco.com\/en\/wp-json\/wp\/v2\/media?parent=35"
            }
        ],
        "curies": [
            {
                "name": "wp",
                "href": "https:\/\/api.w.org\/{rel}",
                "templated": true
            }
        ]
    }
}