{"id":31,"date":"2017-05-15T16:58:14","date_gmt":"2017-05-15T16:58:14","guid":{"rendered":"http:\/\/www.printinlondon.co.uk\/order-online\/?page_id=31"},"modified":"2022-04-25T18:56:34","modified_gmt":"2022-04-25T18:56:34","slug":"home","status":"publish","type":"page","link":"https:\/\/www.printinlondon.co.uk\/order-online\/","title":{"rendered":"Quick Payment Online"},"content":{"rendered":"\n<h2 style=\"text-align: center;\"><b><span style=\"color: red; font-family: helvetica; font-size: x-large;\">Please don&#8217;t pay without instruction<\/span><\/b><\/h2><div><b><span style=\"color: red; font-family: helvetica; font-size: x-large;\"><br \/><\/span><\/b><\/div>\n\n<div id=\"smart-button-container\">\n    <div style=\"text-align: center;\"><label>Your Email ADDRESS <\/label><input id=\"description\" maxlength=\"127\" name=\"descriptionInput\" type=\"text\" value=\"\" \/><\/div>\n      <p id=\"descriptionError\" style=\"color: red; text-align: center; visibility: hidden;\">Please enter a description<\/p>\n    <div style=\"text-align: center;\"><label>Total Amount <\/label><input id=\"amount\" name=\"amountInput\" type=\"number\" value=\"\" \/><span> GBP<\/span><\/div>\n      <p id=\"priceLabelError\" style=\"color: red; text-align: center; visibility: hidden;\">Please enter a price<\/p>\n    <div id=\"invoiceidDiv\" style=\"display: none; text-align: center;\"><label> <\/label><input id=\"invoiceid\" maxlength=\"127\" name=\"invoiceid\" type=\"text\" value=\"\" \/><\/div>\n      <p id=\"invoiceidError\" style=\"color: red; text-align: center; visibility: hidden;\">Please enter an Invoice ID<\/p>\n    <div id=\"paypal-button-container\" style=\"margin-top: 0.625rem; text-align: center;\"><\/div>\n  <\/div>\n  <script data-sdk-integration-source=\"button-factory\" src=\"https:\/\/www.paypal.com\/sdk\/js?client-id=AcEjcrQ-aMwzybRHN0iHsYPco4WVMZi9pAPcE3c_fqclajOWsPjwdrqn91UOyz_VyFz2t7xAUGhv9J3z&amp;enable-funding=venmo&amp;currency=GBP\"><\/script>\n  <script>\n  function initPayPalButton() {\n    var description = document.querySelector('#smart-button-container #description');\n    var amount = document.querySelector('#smart-button-container #amount');\n    var descriptionError = document.querySelector('#smart-button-container #descriptionError');\n    var priceError = document.querySelector('#smart-button-container #priceLabelError');\n    var invoiceid = document.querySelector('#smart-button-container #invoiceid');\n    var invoiceidError = document.querySelector('#smart-button-container #invoiceidError');\n    var invoiceidDiv = document.querySelector('#smart-button-container #invoiceidDiv');\n\n    var elArr = [description, amount];\n\n    if (invoiceidDiv.firstChild.innerHTML.length > 1) {\n      invoiceidDiv.style.display = \"block\";\n    }\n\n    var purchase_units = [];\n    purchase_units[0] = {};\n    purchase_units[0].amount = {};\n\n    function validate(event) {\n      return event.value.length > 0;\n    }\n\n    paypal.Buttons({\n      style: {\n        color: 'gold',\n        shape: 'rect',\n        label: 'paypal',\n        layout: 'vertical',\n        \n      },\n\n      onInit: function (data, actions) {\n        actions.disable();\n\n        if(invoiceidDiv.style.display === \"block\") {\n          elArr.push(invoiceid);\n        }\n\n        elArr.forEach(function (item) {\n          item.addEventListener('keyup', function (event) {\n            var result = elArr.every(validate);\n            if (result) {\n              actions.enable();\n            } else {\n              actions.disable();\n            }\n          });\n        });\n      },\n\n      onClick: function () {\n        if (description.value.length < 1) {\n          descriptionError.style.visibility = \"visible\";\n        } else {\n          descriptionError.style.visibility = \"hidden\";\n        }\n\n        if (amount.value.length < 1) {\n          priceError.style.visibility = \"visible\";\n        } else {\n          priceError.style.visibility = \"hidden\";\n        }\n\n        if (invoiceid.value.length < 1 &#038;&#038; invoiceidDiv.style.display === \"block\") {\n          invoiceidError.style.visibility = \"visible\";\n        } else {\n          invoiceidError.style.visibility = \"hidden\";\n        }\n\n        purchase_units[0].description = description.value;\n        purchase_units[0].amount.value = amount.value;\n\n        if(invoiceid.value !== '') {\n          purchase_units[0].invoice_id = invoiceid.value;\n        }\n      },\n\n      createOrder: function (data, actions) {\n        return actions.order.create({\n          purchase_units: purchase_units,\n        });\n      },\n\n      onApprove: function (data, actions) {\n        return actions.order.capture().then(function (orderData) {\n\n          \/\/ Full available details\n          console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));\n\n          \/\/ Show a success message within this page, e.g.\n          const element = document.getElementById('paypal-button-container');\n          element.innerHTML = '';\n          element.innerHTML = '<h3>Thank you for your payment!<\/h3>';\n\n          \/\/ Or go to another URL:  actions.redirect('thank_you.html');\n          \n        });\n      },\n\n      onError: function (err) {\n        console.log(err);\n      }\n    }).render('#paypal-button-container');\n  }\n  initPayPalButton();\n  <\/script>\n","protected":false},"excerpt":{"rendered":"<p>Please don&#8217;t pay without instruction Your Email ADDRESS Please enter a description Total Amount GBP Please enter a price Please enter an Invoice ID<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-31","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>Quick Payment Online - PRINT IN LONDON - ORDER ONLINE<\/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:\/\/www.printinlondon.co.uk\/order-online\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Quick Payment Online - PRINT IN LONDON - ORDER ONLINE\" \/>\n<meta property=\"og:description\" content=\"Please don&#8217;t pay without instruction Your Email ADDRESS Please enter a description Total Amount GBP Please enter a price Please enter an Invoice ID\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.printinlondon.co.uk\/order-online\/\" \/>\n<meta property=\"og:site_name\" content=\"PRINT IN LONDON - ORDER ONLINE\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-25T18:56:34+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:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/\",\"url\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/\",\"name\":\"Quick Payment Online - PRINT IN LONDON - ORDER ONLINE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/#website\"},\"datePublished\":\"2017-05-15T16:58:14+00:00\",\"dateModified\":\"2022-04-25T18:56:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quick Payment Online\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/#website\",\"url\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/\",\"name\":\"PRINT IN LONDON - ORDER ONLINE\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.printinlondon.co.uk\\\/order-online\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Quick Payment Online - PRINT IN LONDON - ORDER ONLINE","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:\/\/www.printinlondon.co.uk\/order-online\/","og_locale":"en_US","og_type":"article","og_title":"Quick Payment Online - PRINT IN LONDON - ORDER ONLINE","og_description":"Please don&#8217;t pay without instruction Your Email ADDRESS Please enter a description Total Amount GBP Please enter a price Please enter an Invoice ID","og_url":"https:\/\/www.printinlondon.co.uk\/order-online\/","og_site_name":"PRINT IN LONDON - ORDER ONLINE","article_modified_time":"2022-04-25T18:56:34+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.printinlondon.co.uk\/order-online\/","url":"https:\/\/www.printinlondon.co.uk\/order-online\/","name":"Quick Payment Online - PRINT IN LONDON - ORDER ONLINE","isPartOf":{"@id":"https:\/\/www.printinlondon.co.uk\/order-online\/#website"},"datePublished":"2017-05-15T16:58:14+00:00","dateModified":"2022-04-25T18:56:34+00:00","breadcrumb":{"@id":"https:\/\/www.printinlondon.co.uk\/order-online\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.printinlondon.co.uk\/order-online\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.printinlondon.co.uk\/order-online\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.printinlondon.co.uk\/order-online\/"},{"@type":"ListItem","position":2,"name":"Quick Payment Online"}]},{"@type":"WebSite","@id":"https:\/\/www.printinlondon.co.uk\/order-online\/#website","url":"https:\/\/www.printinlondon.co.uk\/order-online\/","name":"PRINT IN LONDON - ORDER ONLINE","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.printinlondon.co.uk\/order-online\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/pages\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":13,"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/pages\/31\/revisions"}],"predecessor-version":[{"id":2600,"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/pages\/31\/revisions\/2600"}],"wp:attachment":[{"href":"https:\/\/www.printinlondon.co.uk\/order-online\/wp-json\/wp\/v2\/media?parent=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}