{"id":7685,"date":"2025-05-06T16:00:05","date_gmt":"2025-05-06T13:00:05","guid":{"rendered":"https:\/\/kayhanturan.com\/?page_id=7685"},"modified":"2025-05-06T16:10:50","modified_gmt":"2025-05-06T13:10:50","slug":"payment-successful","status":"publish","type":"page","link":"https:\/\/kayhanturan.com\/en\/payment-successful\/","title":{"rendered":"Payment Successful"},"content":{"rendered":"\n<style>\r\n    .payment-container{\r\n        max-width: 750px;\r\n        width: 100%;\r\n        border: 1px solid #ccc;\r\n        border-radius: 10px;\r\n        padding: 10px;\r\n        display: flex;\r\n        flex-direction: column;\r\n        gap: 10px 0px;\r\n        justify-content: center;\r\n        align-self: center;\r\n    }\r\n    h2,h3 {\r\n        margin: 0px;\r\n    }\r\n    .flex {\r\n        display: flex;\r\n        flex-direction: row;\r\n        gap: 0px 10px;\r\n        align-items: center;\r\n        border-bottom: 1px solid #aaa;\r\n    }\r\n    .flex h3 {\r\n        width: 50%;\r\n    }\r\n    .container {\r\n        display: flex;\r\n        flex-direction: column;\r\n        align-items: center;\r\n        justify-content: center;\r\n        width: 100%;\r\n    }\r\n    .custom-btn {\r\n        padding: 10px 20px;\r\n        border-radius: 5px;\r\n        background-color: #fff;\r\n        color: #007BFF;\r\n        border: 2px solid #007BFF;\r\n        cursor: pointer;\r\n        font-size: 16px;\r\n        margin-top: 20px;\r\n        transition: 0.3s linear;\r\n    }\r\n    .custom-btn:hover {\r\n        background-color: #007BFF;\r\n        color: #fff;\r\n        transition: 0.3s linear;\r\n\r\n    }\r\n    @media (max-width: 767px) {\r\n        h3 {\r\n            font-size: 14px;    \r\n        }\r\n    }\r\n<\/style>\r\n<body>\r\n    <!-- <h1 style=\"text-align: center;\">Thank you for your payment! We will contact you as soon as possible.<\/h1> -->\r\n    <div class=\"container\">\r\n        <h1>Thank You for Choosing Us<\/h1>\r\n        <div class=\"payment-container\">\r\n            <div class=\"flex\">\r\n                <h3>Name Surname<\/h3>\r\n                <h3 id=\"name\"><\/h3>\r\n            <\/div>\r\n            <div class=\"flex\">\r\n                <h3>Referance Code<\/h3>\r\n                <h3 id=\"referancecode\"><\/h3>\r\n            <\/div>\r\n            <div class=\"flex\">\r\n                <h3>Order ID<\/h3>\r\n                <h3 id=\"orderid\"><\/h3>\r\n            <\/div>\r\n            <div class=\"flex\">\r\n                <h3>Amount<\/h3>\r\n                <h3 id=\"amount\"><\/h3>\r\n            <\/div>\r\n            <div class=\"flex\">\r\n                <h3>Payment Date<\/h3>\r\n                <h3 id=\"dateofpaid\"><\/h3>\r\n            <\/div>\r\n        <\/div>\r\n        <button class=\"custom-btn\" id=\"download-pdf\">Download PDF<\/button>\r\n    <\/div>\r\n<\/body>\r\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.4.0\/jspdf.umd.min.js\"><\/script>\r\n<script>\r\n    const params = new URLSearchParams(window.location.search);\r\n    const referanceCode = params.get('referance_code');\r\n    console.log(referanceCode);\r\n\r\n    const postData = {\r\n        type : \"payment_check\",\r\n        referance_code : referanceCode\r\n    }\r\n\r\n    fetch(\"https:\/\/console.turanturan.com.tr\/api\/online-consultation-referance.php\", {\r\n        method: \"POST\",\r\n        headers: {\r\n            \"Content-Type\": \"application\/json\"\r\n        },\r\n        body: JSON.stringify(postData)\r\n    })\r\n    .then((response) => {\r\n    \r\n        return response.json(); \/\/ JSON yan\u0131t\u0131 i\u015fleyin\r\n        \r\n    })\r\n    .then((data) => {\r\n        console.log(\"data\",data); \/\/ Ba\u015far\u0131l\u0131 yan\u0131t\u0131 konsola yazd\u0131r\r\n        if (data.status == \"success\") {\r\n            const name = document.getElementById(\"name\");\r\n            const referancecode = document.getElementById(\"referancecode\");\r\n            const orderid = document.getElementById(\"orderid\");\r\n            const dateofpaid = document.getElementById(\"dateofpaid\");\r\n            const amount = document.getElementById(\"amount\");\r\n\r\n            amount.innerText = data.data.amount + ' $';\r\n            name.innerText = data.data.name;\r\n            referancecode.innerText = data.data.referance_code;\r\n            orderid.innerText = data.data.order_id;\r\n\r\n            const dateObject = new Date(data.data.created_at); \/\/ Tarihi Date nesnesine d\u00f6n\u00fc\u015ft\u00fcr\r\n\r\n            \/\/ G\u00fcn, Ay, Y\u0131l, Saat ve Dakikay\u0131 al\u0131n\r\n            const day = String(dateObject.getDate()).padStart(2, '0'); \/\/ 30\r\n            const month = String(dateObject.getMonth() + 1).padStart(2, '0'); \/\/ 12 (Aylar 0'dan ba\u015flar)\r\n            const year = dateObject.getFullYear(); \/\/ 2024\r\n            const hours = String(dateObject.getHours()).padStart(2, '0'); \/\/ 14\r\n            const minutes = String(dateObject.getMinutes()).padStart(2, '0'); \/\/ 42\r\n\r\n            \/\/ Yeni formatta birle\u015ftir\r\n            const formattedDate = `${day}\/${month}\/${year} ${hours}:${minutes}`;\r\n\r\n            dateofpaid.innerText = formattedDate;\r\n        }\r\n    })\r\n    .catch((error) => {\r\n        console.error(\"Hata:\", error);\r\n    });\r\n\r\n    document.getElementById('download-pdf').addEventListener('click', function () {\r\n        \/\/ jsPDF k\u00fct\u00fcphanesini ba\u015flat\r\n        const { jsPDF } = window.jspdf;\r\n        const doc = new jsPDF();\r\n\r\n        \/\/ HTML i\u00e7eri\u011finden verileri al\r\n        const name = document.getElementById('name').innerText;\r\n        const referanceCode = document.getElementById('referancecode').innerText;\r\n        const orderId = document.getElementById('orderid').innerText;\r\n        const dateOfPaid = document.getElementById('dateofpaid').innerText;\r\n        const amount = document.getElementById('amount').innerText;\r\n        \/\/ PDF i\u00e7eri\u011fini olu\u015ftur\r\n        doc.setFontSize(16);\r\n        doc.text('Thank you for your payment', 10, 10);\r\n        doc.setFontSize(12);\r\n        doc.text(`Name Surname: ${name}`, 10, 30);\r\n        doc.text(`Referance Code: ${referanceCode}`, 10, 40);\r\n        doc.text(`Order ID: ${orderId}`, 10, 50);\r\n        doc.text(`Amount: ${amount}`, 10, 60);\r\n        doc.text(`Payment Date: ${dateOfPaid}`, 10, 70);\r\n\r\n        \/\/ PDF dosyas\u0131n\u0131 indir\r\n        doc.save(`${referanceCode}.pdf`);\r\n    });\r\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":12,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7685","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association<\/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:\/\/kayhanturan.com\/en\/payment-successful\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kayhanturan.com\/en\/payment-successful\/\" \/>\n<meta property=\"og:site_name\" content=\"Kayhan Turan | President of Robotic Orthopedic Surgery Association\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/opdrkayhanturan\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-06T13:10:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/payment-successful\\\/\",\"url\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/payment-successful\\\/\",\"name\":\"Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#website\"},\"datePublished\":\"2025-05-06T13:00:05+00:00\",\"dateModified\":\"2025-05-06T13:10:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/payment-successful\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kayhanturan.com\\\/en\\\/payment-successful\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/\",\"name\":\"Kayhan Turan | President of Robotic Orthopedic Surgery Association\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#organization\",\"name\":\"Ortopedi Robotik Cerrahi Derne\u011fi Ba\u015fkan\u0131 | Kayhan Turan\",\"url\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/kayhanturan.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/siyahlogo-300x68-1.png\",\"contentUrl\":\"https:\\\/\\\/kayhanturan.com\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/siyahlogo-300x68-1.png\",\"width\":300,\"height\":68,\"caption\":\"Ortopedi Robotik Cerrahi Derne\u011fi Ba\u015fkan\u0131 | Kayhan Turan\"},\"image\":{\"@id\":\"https:\\\/\\\/kayhanturan.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/opdrkayhanturan\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association","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:\/\/kayhanturan.com\/en\/payment-successful\/","og_locale":"en_US","og_type":"article","og_title":"Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association","og_url":"https:\/\/kayhanturan.com\/en\/payment-successful\/","og_site_name":"Kayhan Turan | President of Robotic Orthopedic Surgery Association","article_publisher":"https:\/\/www.facebook.com\/opdrkayhanturan\/","article_modified_time":"2025-05-06T13:10:50+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kayhanturan.com\/en\/payment-successful\/","url":"https:\/\/kayhanturan.com\/en\/payment-successful\/","name":"Payment Successful | Kayhan Turan | President of Robotic Orthopedic Surgery Association","isPartOf":{"@id":"https:\/\/kayhanturan.com\/en\/#website"},"datePublished":"2025-05-06T13:00:05+00:00","dateModified":"2025-05-06T13:10:50+00:00","breadcrumb":{"@id":"https:\/\/kayhanturan.com\/en\/payment-successful\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kayhanturan.com\/en\/payment-successful\/"]}]},{"@type":"WebSite","@id":"https:\/\/kayhanturan.com\/en\/#website","url":"https:\/\/kayhanturan.com\/en\/","name":"Kayhan Turan | President of Robotic Orthopedic Surgery Association","description":"","publisher":{"@id":"https:\/\/kayhanturan.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kayhanturan.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kayhanturan.com\/en\/#organization","name":"Ortopedi Robotik Cerrahi Derne\u011fi Ba\u015fkan\u0131 | Kayhan Turan","url":"https:\/\/kayhanturan.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kayhanturan.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/kayhanturan.com\/wp-content\/uploads\/2022\/02\/siyahlogo-300x68-1.png","contentUrl":"https:\/\/kayhanturan.com\/wp-content\/uploads\/2022\/02\/siyahlogo-300x68-1.png","width":300,"height":68,"caption":"Ortopedi Robotik Cerrahi Derne\u011fi Ba\u015fkan\u0131 | Kayhan Turan"},"image":{"@id":"https:\/\/kayhanturan.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/opdrkayhanturan\/"]}]}},"_links":{"self":[{"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/pages\/7685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/comments?post=7685"}],"version-history":[{"count":1,"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/pages\/7685\/revisions"}],"predecessor-version":[{"id":7687,"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/pages\/7685\/revisions\/7687"}],"wp:attachment":[{"href":"https:\/\/kayhanturan.com\/en\/wp-json\/wp\/v2\/media?parent=7685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}