{"id":47248,"date":"2025-10-14T14:13:30","date_gmt":"2025-10-14T12:13:30","guid":{"rendered":"https:\/\/reformaten.com\/?page_id=47248"},"modified":"2025-10-14T15:00:40","modified_gmt":"2025-10-14T13:00:40","slug":"payment","status":"publish","type":"page","link":"https:\/\/reformaten.com\/se\/payment\/","title":{"rendered":"Payment"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"47248\" class=\"elementor elementor-47248\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f093a61 e-flex e-con-boxed e-con e-parent\" data-id=\"f093a61\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4b1ab76 elementor-widget elementor-widget-html\" data-id=\"4b1ab76\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\r\n\/* --- POPUP CSS STYLES --- *\/\r\n#swish-popup {\r\n    display: none; \/* Starts hidden *\/\r\n    position: fixed;\r\n    z-index: 9999; \/* Ensure it is above all other content *\/\r\n    left: 0;\r\n    top: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    overflow: auto;\r\n    background-color: rgba(0, 0, 0, 0.7); \/* Dark semi-transparent overlay *\/\r\n}\r\n\r\n#popup-content {\r\n    background-color: #fefefe;\r\n    margin: 10% auto; \/* 10% from the top and centered *\/\r\n    padding: 20px;\r\n    border: 1px solid #888;\r\n    width: 80%; \/* Adjust width as needed *\/\r\n    max-width: 600px; \/* Max width for larger screens *\/\r\n    border-radius: 8px;\r\n    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\r\n    text-align: center;\r\n}\r\n\r\n#popup-content-area h2 {\r\n    color: #333;\r\n    margin-top: 0;\r\n}\r\n\r\n\/* Close button style *\/\r\n.close-button {\r\n    color: #aaa;\r\n    float: right;\r\n    font-size: 28px;\r\n    font-weight: bold;\r\n}\r\n\r\n.close-button:hover,\r\n.close-button:focus {\r\n    color: #000;\r\n    text-decoration: none;\r\n    cursor: pointer;\r\n}\r\n\r\n\/* Custom Swish Styles *\/\r\n.swish-section {\r\n    padding: 15px 0;\r\n}\r\n\r\n.swish-button {\r\n    display: block;\r\n    width: 90%;\r\n    margin: 15px auto;\r\n    padding: 15px;\r\n    background-color: #000000; \/* Swish Black *\/\r\n    color: white !important; \/* Force white text *\/\r\n    text-decoration: none;\r\n    border-radius: 5px;\r\n    font-size: 1.1em;\r\n    font-weight: bold;\r\n    transition: background-color 0.3s;\r\n}\r\n\r\n.swish-button:hover {\r\n    background-color: #333333;\r\n}\r\n\r\n.total-number {\r\n    font-size: 1.2em;\r\n    font-weight: bold;\r\n    color: #333;\r\n}\r\n\r\n.swish-number {\r\n    font-size: 1.5em;\r\n    font-weight: 900;\r\n    color: #000;\r\n    margin: 10px 0;\r\n}\r\n\r\n#qr-code-container {\r\n    display: none;\r\n    padding: 20px;\r\n}\r\n\r\n#qr-amount-display {\r\n    font-size: 1.1em;\r\n    margin-bottom: 20px;\r\n}\r\n\r\n\/* Ensure Elementor doesn't hide essential elements *\/\r\n.war-orange {\r\n    color: #e67e22 !important;\r\n}\r\n<\/style>\r\n\r\n<div id=\"swish-popup\">\r\n    <div id=\"popup-content\">\r\n        <span class=\"close-button\">&times;<\/span>\r\n        <div id=\"popup-content-area\">\r\n            <\/div>\r\n        \r\n        <div id=\"qr-code-container\">\r\n            <p id=\"qr-amount-display\"><\/p>\r\n            \r\n            <img decoding=\"async\" src=\"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png\" id=\"qr-code-image\" alt=\"Swish QR Code\" style=\"max-width: 250px; height: auto; margin-bottom: 15px;\">\r\n            \r\n            <button id=\"back-to-buttons\" class=\"swish-button\" style=\"background-color: #e67e22; border: none;\">\r\n                &larr; Tillbaka till knappar\r\n            <\/button>\r\n        <\/div>\r\n    <\/div>\r\n<\/div>\r\n\r\n<script>\r\n\/\/ --- JS UTILITY FUNCTIONS ---\r\n\/\/ Function to generate and show the QR code\r\nfunction showQrCode(amount) {\r\n    document.getElementById('buttons-and-instructions').style.display = 'none';\r\n    \r\n    const qrContainer = document.getElementById('qr-code-container');\r\n    const qrAmountDisplay = document.getElementById('qr-amount-display');\r\n    const qrImage = document.getElementById('qr-code-image');\r\n    \r\n    \/\/ Swish QR code link format: swish:\/\/payment?token=xxxx&amount=xxxx&message=xxxx\r\n    \/\/ Since we don't have a specific payment token, we use a static image generator link\r\n    \/\/ NOTE: This uses an external public QR code generator (e.g., Google Charts). \r\n    \/\/ You should use your own preferred QR code service if available.\r\n    \r\n    const swishNumber = '1234100244'; \/\/ Your Swish number\r\n    const message = encodeURIComponent('Fr\u00f6kriget');\r\n    \r\n    \/\/ Construct the data string for the QR code: SWISH;VERSION;RECIPIENT;AMOUNT;MESSAGE\r\n    const qrData = `C${swishNumber};${amount};${message}`;\r\n    \r\n    \/\/ Construct the QR code image URL (using a simple external generator)\r\n    qrImage.src = `https:\/\/chart.googleapis.com\/chart?chs=250x250&cht=qr&chl=${qrData}&choe=UTF-8`;\r\n    \r\n    qrAmountDisplay.innerHTML = `Skanna koden ovan f\u00f6r att betala <span class=\"war-orange\">${amount} SEK<\/span>`;\r\n    \r\n    qrContainer.style.display = 'block';\r\n}\r\n\r\n\/\/ Function to show the main buttons view and hide the QR code\r\nfunction showButtons() {\r\n    const buttonsSection = document.getElementById('buttons-and-instructions');\r\n    if (buttonsSection) {\r\n        buttonsSection.style.display = 'block';\r\n    }\r\n    document.getElementById('qr-code-container').style.display = 'none';\r\n}\r\n\r\n\r\n\/\/ --- IMMEDIATE POPUP TRIGGER ON PAGE LOAD ---\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n\r\n    \/\/ 1. Get the final amount from the URL parameter\r\n    const urlParams = new URLSearchParams(window.location.search);\r\n    \/\/ This looks for the value after ?total_amount= from the redirect\r\n    const finalAmount = parseInt(urlParams.get('total_amount')) || 0; \r\n    \r\n    const popup = document.getElementById('swish-popup');\r\n    const popupContentArea = document.getElementById('popup-content-area');\r\n    \r\n    \/\/ 2. Attach handlers for the close and back buttons\r\n    const closeButton = document.querySelector('.close-button');\r\n    if (closeButton) {\r\n        closeButton.addEventListener('click', function() {\r\n            popup.style.display = 'none';\r\n        });\r\n    }\r\n\r\n    const backButton = document.getElementById('back-to-buttons');\r\n    if (backButton) {\r\n        backButton.addEventListener('click', showButtons);\r\n    }\r\n    \r\n    \/\/ Close the popup if the user clicks anywhere outside the content\r\n    window.addEventListener('click', function(event) {\r\n        if (event.target == popup) {\r\n            popup.style.display = 'none';\r\n        }\r\n    });\r\n\r\n    \r\n    \/\/ 3. Conditional content and display\r\n    if (finalAmount > 0) {\r\n        \r\n        \/\/ --- Dynamic Content HTML ---\r\n        const dynamicSwishContent = `\r\n            <h2>\ud83c\udf89 Bokning Bekr\u00e4ftad!<\/h2>\r\n            <div id=\"buttons-and-instructions\" class=\"swish-section\">\r\n                <h2>S\u00e5 h\u00e4r betalar du med Swish<\/h2>\r\n                <p class=\"swish-instructions\">Anv\u00e4nd QR-koden nedan eller klicka p\u00e5 knappen f\u00f6r att betala enkelt med Swish. Se till att beloppet \u00e4r korrekt!<\/p>\r\n                \r\n                <p class=\"swish-number\">123-410 02 44<\/p>\r\n                <p class=\"total-number\">Totalpris att swisha <span class=\"war-orange\">${finalAmount} SEK<\/span><\/p>\r\n                \r\n                <a href=\"javascript:void(0)\" onclick=\"showQrCode(${finalAmount})\" class=\"swish-button\">\r\n                    Betala med Swish (QR-kod)\r\n                <\/a>\r\n                \r\n                <a href=\"https:\/\/app.swish.nu\/1\/p\/sw\/?sw=1234100244&amt=${finalAmount}&msg=Fr%C3%B6kriget\" class=\"swish-button\" target=\"_blank\">\r\n                    Betala med Swish (Mobil)\r\n                <\/a>\r\n                \r\n                <p class=\"desktop-swish-note\">Om du l\u00e4ser detta p\u00e5 en dator: \u00d6ppna Swish-appen i din telefon och skanna QR-koden.<\/p>\r\n            <\/div>\r\n        `;\r\n        \r\n        \/\/ 4. Inject content and display popup\r\n        popupContentArea.innerHTML = dynamicSwishContent;\r\n        showButtons(); \/\/ Ensure the buttons view is shown initially\r\n        popup.style.display = 'block'; \r\n        \r\n    } else {\r\n        \/\/ Fallback for missing\/zero amount (e.g., direct visit or calculation error)\r\n        popupContentArea.innerHTML = '<h2>\u26a0\ufe0f Betalningsfel<\/h2><p>Kunde inte hitta det totala beloppet f\u00f6r bokningen. V\u00e4nligen kontakta oss f\u00f6r att slutf\u00f6ra betalningen.<\/p>';\r\n        popup.style.display = 'block';\r\n    }\r\n});\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>&times; &larr; Tillbaka till knappar<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"give_campaign_id":0,"inline_featured_image":false,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-47248","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Payment - Reformaten<\/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:\/\/reformaten.com\/se\/payment\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Payment - Reformaten\" \/>\n<meta property=\"og:description\" content=\"&times; &larr; Tillbaka till knappar\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reformaten.com\/se\/payment\/\" \/>\n<meta property=\"og:site_name\" content=\"Reformaten\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/reformaten\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-14T13:00:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/\",\"url\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/\",\"name\":\"Payment - Reformaten\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reformaten.com\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Farg-swish-QR-large-3-1-scaled.png\",\"datePublished\":\"2025-10-14T12:13:30+00:00\",\"dateModified\":\"2025-10-14T13:00:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reformaten.com\\\/payment\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/#primaryimage\",\"url\":\"https:\\\/\\\/reformaten.com\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Farg-swish-QR-large-3-1-scaled.png\",\"contentUrl\":\"https:\\\/\\\/reformaten.com\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Farg-swish-QR-large-3-1-scaled.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/payment\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hem\",\"item\":\"https:\\\/\\\/reformaten.com\\\/se\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Payment\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#website\",\"url\":\"https:\\\/\\\/reformaten.com\\\/se\\\/\",\"name\":\"www.reformaten.com\",\"description\":\"Reformaten \u00e4r en r\u00f6relse f\u00f6r ett positivt globalt matsystem - det ska vara l\u00e4tt att \u00e4ta r\u00e4tt!\",\"publisher\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#organization\"},\"alternateName\":\"reformaten.com\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/reformaten.com\\\/se\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#organization\",\"name\":\"Reformaten\",\"alternateName\":\"Reformaten.com\",\"url\":\"https:\\\/\\\/reformaten.com\\\/se\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/reformaten.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cropped-Untitled-design-4-1.png\",\"contentUrl\":\"https:\\\/\\\/reformaten.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/cropped-Untitled-design-4-1.png\",\"width\":1920,\"height\":549,\"caption\":\"Reformaten\"},\"image\":{\"@id\":\"https:\\\/\\\/reformaten.com\\\/se\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/reformaten\",\"https:\\\/\\\/www.youtube.com\\\/@reformaten1309\",\"https:\\\/\\\/www.instagram.com\\\/reformaten\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/reformaten\\\/posts\\\/?feedView=all\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Payment - Reformaten","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:\/\/reformaten.com\/se\/payment\/","og_locale":"sv_SE","og_type":"article","og_title":"Payment - Reformaten","og_description":"&times; &larr; Tillbaka till knappar","og_url":"https:\/\/reformaten.com\/se\/payment\/","og_site_name":"Reformaten","article_publisher":"https:\/\/www.facebook.com\/reformaten","article_modified_time":"2025-10-14T13:00:40+00:00","og_image":[{"url":"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Ber\u00e4knad l\u00e4stid":"1 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/reformaten.com\/payment\/","url":"https:\/\/reformaten.com\/payment\/","name":"Payment - Reformaten","isPartOf":{"@id":"https:\/\/reformaten.com\/se\/#website"},"primaryImageOfPage":{"@id":"https:\/\/reformaten.com\/payment\/#primaryimage"},"image":{"@id":"https:\/\/reformaten.com\/payment\/#primaryimage"},"thumbnailUrl":"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png","datePublished":"2025-10-14T12:13:30+00:00","dateModified":"2025-10-14T13:00:40+00:00","breadcrumb":{"@id":"https:\/\/reformaten.com\/payment\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reformaten.com\/payment\/"]}]},{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/reformaten.com\/payment\/#primaryimage","url":"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png","contentUrl":"https:\/\/reformaten.com\/wp-content\/uploads\/2025\/10\/Farg-swish-QR-large-3-1-scaled.png"},{"@type":"BreadcrumbList","@id":"https:\/\/reformaten.com\/payment\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Hem","item":"https:\/\/reformaten.com\/se\/"},{"@type":"ListItem","position":2,"name":"Payment"}]},{"@type":"WebSite","@id":"https:\/\/reformaten.com\/se\/#website","url":"https:\/\/reformaten.com\/se\/","name":"www.reformaten.com","description":"Reformaten \u00e4r en r\u00f6relse f\u00f6r ett positivt globalt matsystem - det ska vara l\u00e4tt att \u00e4ta r\u00e4tt!","publisher":{"@id":"https:\/\/reformaten.com\/se\/#organization"},"alternateName":"reformaten.com","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/reformaten.com\/se\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":"Organization","@id":"https:\/\/reformaten.com\/se\/#organization","name":"Reformaten","alternateName":"Reformaten.com","url":"https:\/\/reformaten.com\/se\/","logo":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/reformaten.com\/se\/#\/schema\/logo\/image\/","url":"https:\/\/reformaten.com\/wp-content\/uploads\/2022\/12\/cropped-Untitled-design-4-1.png","contentUrl":"https:\/\/reformaten.com\/wp-content\/uploads\/2022\/12\/cropped-Untitled-design-4-1.png","width":1920,"height":549,"caption":"Reformaten"},"image":{"@id":"https:\/\/reformaten.com\/se\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/reformaten","https:\/\/www.youtube.com\/@reformaten1309","https:\/\/www.instagram.com\/reformaten\/","https:\/\/www.linkedin.com\/company\/reformaten\/posts\/?feedView=all"]}]}},"campaignId":"","_links":{"self":[{"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/pages\/47248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/comments?post=47248"}],"version-history":[{"count":13,"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/pages\/47248\/revisions"}],"predecessor-version":[{"id":47317,"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/pages\/47248\/revisions\/47317"}],"wp:attachment":[{"href":"https:\/\/reformaten.com\/se\/wp-json\/wp\/v2\/media?parent=47248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}