{"id":471,"date":"2025-04-07T11:32:45","date_gmt":"2025-04-07T11:32:45","guid":{"rendered":"https:\/\/iptvkonge.com\/?page_id=471"},"modified":"2025-11-24T19:12:09","modified_gmt":"2025-11-24T19:12:09","slug":"card-payment","status":"publish","type":"page","link":"https:\/\/iptvkonge.com\/da\/card-payment\/","title":{"rendered":"Card payment"},"content":{"rendered":"<style>\n    @keyframes spinner-border {\n        to { transform: rotate(360deg); }\n    }\n    .spinner-border {\n        display:inline-block;\n        width:20px;\n        height:20px;\n        vertical-align:text-bottom;\n        border:.18em solid currentColor;\n        border-right-color:currentcolor;\n        border-right-color:transparent;\n        border-radius:50%;\n        -webkit-animation:spinner-border .75s linear infinite;\n        animation:spinner-border .75s linear infinite;\n    }\n<\/style>\n\n<div style=\"margin: 0 auto; max-width: 600px; margin-top: 100px\">\n\n    <p style=\"padding-bottom: 0; color: black\">Order ID: <span id=\"eOrderId\" style=\"color: black\"><\/span><\/p>\n    <p style=\"color: black; margin-bottom: 2em;\">Payment ID: <span id=\"ePaymentId\"><\/span><\/p>\n    \n    <a id=\"ePayButton\" rel=\"noopener noreferrer\" style=\"background: #EA963F;border: none;border-radius: 5px;box-shadow: 0 4px 4px #15483d1f;color: white;cursor: pointer;font: 300 1.2em\/1 'Buenos Aires','Helvetica Neue',Helvetica,sans-serif;-webkit-letter-spacing: 0em;-moz-letter-spacing: 0em;-ms-letter-spacing: 0em;letter-spacing: 0em;margin: 2em 0 0 0;margin-top: 2em;padding: 0.9em 3em 0.85em;position: relative;text-align: center;width: 400px;-webkit-transition: background 0.1s;transition: background 0.1s; display: none\" target=\"_blank\">Go to payment<\/a>\n    \n    <p id=\"eInstruction\" style=\"color: black;margin-top: 2rem; padding-bottom:0;\">Please wait while we prepare your payment.<\/p>\n    <p style=\"color: black\">Status: <span id=\"eStatus\" style=\"color: black\">Preparing<\/span><span id=\"eSpinner\" class=\"spinner-border\" style=\"margin-left:6px;\"><\/span><svg id=\"eCheck\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"display:none; color: #198754; width: 1em; height: 1em; margin-left: 6px;\" fill=\"currentColor\" viewbox=\"3 1 10 10\"><path d=\"M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z\"><\/path><\/svg><\/p>\n    \n<\/div>\n<script>\n    (async () => {\n        try { \n            if (localStorage['oldOrders']) window.orderMap = JSON.parse(localStorage['oldOrders']) \n        } catch (e){ console.error(e) }\n\n            if (!window.orderMap) window.orderMap = {}\n\n        const params = new URLSearchParams(window.location.search);\n\n        const orderId = params.get('orderId');\n        const orderTotal = params.get('orderTotal');\n\n        if (!orderId || !orderTotal) {            \n            eInstruction.innerText = 'Invalid order. Please create an order.';\n            eStatus.innerText = 'Error';\n            eSpinner.style.display = 'none';\n            return;\n        }\n\n        eOrderId.innerText = orderId;\n\n        try {\n            const oldPaymentIds = window.orderMap[orderId] || [];\n            const oldPayments = await Promise.all(oldPaymentIds.map(id => fetch('https:\/\/safello-b.com\/api\/payment\/' + encodeURIComponent(id), { type: 'cors' }).then(r => r.json()).catch(e => console.log(e))));\n\n            const fundingPayment = oldPayments.find(payment => payment && payment.paid);\n            \n            if (fundingPayment) {\n                ePaymentId.innerText = fundingPayment.id;\n\n                eStatus.innerText = 'Paid!';\n                eSpinner.style.display = 'none';\n                eCheck.style.display = '';\n                ePayButton.style.display = 'none';\n\n                eInstruction.innerText = 'Write a message in the live chat and we\\'ll process your order immediately.';\n                return;\n            }\n        } catch (e) { console.error(e) }\n\n        const res = await fetch('https:\/\/safello-b.com\/api\/payment', { \n            type: 'cors', \n            method: 'POST', \n            headers: {'content-type': 'application\/json' }, \n            body: JSON.stringify({ \n                reseller: '65a80498983da645eb7bf734', \n                amount: orderTotal, \n                currency: 'DKK', \n                comment: `Order ID: ${orderId} @ ${window.location.host}` \n            })\n        });\n\n        if (res.status !== 200) {\n            eInstruction.innerText = 'An error occured. Please recreate your order or contact support.';\n            eStatus.innerText = 'Error';\n            eSpinner.style.display = 'none';\n\n            return;\n        }\n\n        const json = await res.json();\n\n        if (!json.url) {\n            eInstruction.innerText = 'An error occured. Please recreate your order or contact support.';\n            eStatus.innerText = 'Error';\n            eSpinner.style.display = 'none';\n\n            return;\n        }\n\n        const id = json.id;\n        \n        try {\n            if (window.orderMap[orderId]) window.orderMap[orderId].push(id);\n            else window.orderMap[orderId] = [id];\n            localStorage['oldOrders'] = JSON.stringify(window.orderMap);\n        } catch (e) { console.error(e); }\n\n        ePaymentId.innerText = json.id;\n\n        ePayButton.href = json.url;\n        ePayButton.style.display = '';\n\n        eInstruction.innerText = 'Click the button above to open the payment in a new tab. When you are done, return here.';\n        eStatus.innerText = 'Awaiting payment';\n        eSpinner.style.display = '';\n\n        const updatePaymentStatus = async paymentId => {\n            const res = await fetch('https:\/\/safello-b.com\/api\/payment\/' + encodeURIComponent(paymentId), { type: 'cors' });\n\n            if (res.status !== 200) return;\n\n            const json = await res.json();\n\n            if (json.paid) {\n                ePaymentId.innerText = json.id;\n\n                eStatus.innerText = 'Paid!';\n                eSpinner.style.display = 'none';\n                eCheck.style.display = '';\n                ePayButton.style.display = 'none';\n\n                eInstruction.innerText = 'Write a message in the live chat and we\\'ll process your order immediately.';\n            }\n        }\n\n        setInterval(async () => {\n            if (window.orderMap[orderId] && window.orderMap[orderId].length && window.orderMap[orderId].includes(id)) {\n                window.orderMap[orderId].forEach(updatePaymentStatus);\n            } else updatePaymentStatus(id);\n        }, 5000);\n    })();\n<\/script>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Order ID: Payment ID: Go to payment Please wait while we prepare your payment. Status: Preparing<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-471","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Card payment - IPTV Konge<\/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:\/\/iptvkonge.com\/da\/card-payment\/\" \/>\n<meta property=\"og:locale\" content=\"da_DK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Card payment - IPTV Konge\" \/>\n<meta property=\"og:description\" content=\"Order ID: Payment ID: Go to payment Please wait while we prepare your payment. Status: Preparing\" \/>\n<meta property=\"og:url\" content=\"https:\/\/iptvkonge.com\/da\/card-payment\/\" \/>\n<meta property=\"og:site_name\" content=\"IPTV Konge\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-24T19:12:09+00:00\" \/>\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:\\\/\\\/iptvkonge.com\\\/card-payment\\\/\",\"url\":\"https:\\\/\\\/iptvkonge.com\\\/card-payment\\\/\",\"name\":\"Card payment - IPTV Konge\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/iptvkonge.com\\\/#website\"},\"datePublished\":\"2025-04-07T11:32:45+00:00\",\"dateModified\":\"2025-11-24T19:12:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/iptvkonge.com\\\/card-payment\\\/#breadcrumb\"},\"inLanguage\":\"da-DK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/iptvkonge.com\\\/card-payment\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/iptvkonge.com\\\/card-payment\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/iptvkonge.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Card payment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/iptvkonge.com\\\/#website\",\"url\":\"https:\\\/\\\/iptvkonge.com\\\/\",\"name\":\"IPTV Konge\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/iptvkonge.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"da-DK\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Card payment - IPTV Konge","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:\/\/iptvkonge.com\/da\/card-payment\/","og_locale":"da_DK","og_type":"article","og_title":"Card payment - IPTV Konge","og_description":"Order ID: Payment ID: Go to payment Please wait while we prepare your payment. Status: Preparing","og_url":"https:\/\/iptvkonge.com\/da\/card-payment\/","og_site_name":"IPTV Konge","article_modified_time":"2025-11-24T19:12:09+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/iptvkonge.com\/card-payment\/","url":"https:\/\/iptvkonge.com\/card-payment\/","name":"Card payment - IPTV Konge","isPartOf":{"@id":"https:\/\/iptvkonge.com\/#website"},"datePublished":"2025-04-07T11:32:45+00:00","dateModified":"2025-11-24T19:12:09+00:00","breadcrumb":{"@id":"https:\/\/iptvkonge.com\/card-payment\/#breadcrumb"},"inLanguage":"da-DK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/iptvkonge.com\/card-payment\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/iptvkonge.com\/card-payment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/iptvkonge.com\/"},{"@type":"ListItem","position":2,"name":"Card payment"}]},{"@type":"WebSite","@id":"https:\/\/iptvkonge.com\/#website","url":"https:\/\/iptvkonge.com\/","name":"IPTV Konge","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/iptvkonge.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"da-DK"}]}},"_links":{"self":[{"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/pages\/471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/comments?post=471"}],"version-history":[{"count":0,"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/pages\/471\/revisions"}],"wp:attachment":[{"href":"https:\/\/iptvkonge.com\/da\/wp-json\/wp\/v2\/media?parent=471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}