{"id":253,"date":"2021-09-14T19:19:22","date_gmt":"2021-09-14T18:19:22","guid":{"rendered":"http:\/\/www.mikebethel.com\/?page_id=253"},"modified":"2021-09-16T14:33:44","modified_gmt":"2021-09-16T13:33:44","slug":"thank-you-3","status":"publish","type":"page","link":"http:\/\/www.mikebethel.com\/?page_id=253","title":{"rendered":"Thank You"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Thank you for purchasing my book.  I very much hope you enjoy it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please complete one of the following payment options, selecting UK\/International postage and quantity required:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><div id=\"smart-button-container\">\n      <div style=\"text-align: center;\">\n        <div style=\"margin-bottom: 1.25rem;\">\n          <p>2021 Suite For Guitar by Mike Bethel<\/p>\n          <select id=\"item-options\"><option value=\"Postage within UK\" price=\"5.55\">Postage within UK &#8211; 5.55 GBP<\/option><option value=\"Postage to rest of world\" price=\"7.77\">Postage to rest of world &#8211; 7.77 GBP<\/option><\/select>\n          <select style=\"visibility: hidden\" id=\"quantitySelect\"><option value=\"1\">1<\/option><option value=\"2\">2<\/option><option value=\"3\">3<\/option><option value=\"4\">4<\/option><option value=\"5\">5<\/option><option value=\"6\">6<\/option><option value=\"7\">7<\/option><option value=\"8\">8<\/option><option value=\"9\">9<\/option><option value=\"10\">10<\/option><\/select>\n        <\/div>\n      <div id=\"paypal-button-container\"><\/div>\n      <\/div>\n    <\/div>\n    <script src=\"https:\/\/www.paypal.com\/sdk\/js?client-id=AUV7em5UIgM2c5PxDJvXxGOwlrCrFRU-dj_OUAGDHDsb6-UGIfRweG5NpDXgtB1fj9bceTL7M654w2W0&#038;enable-funding=venmo&#038;currency=GBP\" data-sdk-integration-source=\"button-factory\"><\/script>\n    <script>\n      function initPayPalButton() {\n        var shipping = 0;\n        var itemOptions = document.querySelector(\"#smart-button-container #item-options\");\n    var quantity = parseInt(10);\n    var quantitySelect = document.querySelector(\"#smart-button-container #quantitySelect\");\n    if (!isNaN(quantity)) {\n      quantitySelect.style.visibility = \"visible\";\n    }\n    var orderDescription = '2021 Suite For Guitar by Mike Bethel';\n    if(orderDescription === '') {\n      orderDescription = 'Item';\n    }\n    paypal.Buttons({\n      style: {\n        shape: 'pill',\n        color: 'white',\n        layout: 'vertical',\n        label: 'buynow',\n        \n      },\n      createOrder: function(data, actions) {\n        var selectedItemDescription = itemOptions.options[itemOptions.selectedIndex].value;\n        var selectedItemPrice = parseFloat(itemOptions.options[itemOptions.selectedIndex].getAttribute(\"price\"));\n        var tax = (0 === 0 || false) ? 0 : (selectedItemPrice * (parseFloat(0)\/100));\n        if(quantitySelect.options.length > 0) {\n          quantity = parseInt(quantitySelect.options[quantitySelect.selectedIndex].value);\n        } else {\n          quantity = 1;\n        }\n\n        tax *= quantity;\n        tax = Math.round(tax * 100) \/ 100;\n        var priceTotal = quantity * selectedItemPrice + parseFloat(shipping) + tax;\n        priceTotal = Math.round(priceTotal * 100) \/ 100;\n        var itemTotalValue = Math.round((selectedItemPrice * quantity) * 100) \/ 100;\n\n        return actions.order.create({\n          purchase_units: [{\n            description: orderDescription,\n            amount: {\n              currency_code: 'GBP',\n              value: priceTotal,\n              breakdown: {\n                item_total: {\n                  currency_code: 'GBP',\n                  value: itemTotalValue,\n                },\n                shipping: {\n                  currency_code: 'GBP',\n                  value: shipping,\n                },\n                tax_total: {\n                  currency_code: 'GBP',\n                  value: tax,\n                }\n              }\n            },\n            items: [{\n              name: selectedItemDescription,\n              unit_amount: {\n                currency_code: 'GBP',\n                value: selectedItemPrice,\n              },\n              quantity: quantity\n            }]\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      onError: function(err) {\n        console.log(err);\n      },\n    }).render('#paypal-button-container');\n  }\n  initPayPalButton();\n    <\/script><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please allow up to 14 days for delivery.  The book will be sent to the delivery address set when you paid.  If this is incorrect, please email me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Thank you for purchasing my book. I very much hope you enjoy it. Please complete one of the following payment options, selecting UK\/International postage and quantity required: 2021 Suite For Guitar by Mike Bethel Postage within UK &#8211; 5.55 GBPPostage to rest of world &#8211; 7.77 GBP 12345678910 Please allow up to 14 days for &hellip; <a href=\"http:\/\/www.mikebethel.com\/?page_id=253\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Thank You<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":148,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-253","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/pages\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=253"}],"version-history":[{"count":4,"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/pages\/253\/revisions"}],"predecessor-version":[{"id":278,"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/pages\/253\/revisions\/278"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"http:\/\/www.mikebethel.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}