{"id":689,"date":"2021-11-05T21:45:51","date_gmt":"2021-11-05T21:45:51","guid":{"rendered":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/?page_id=689"},"modified":"2021-11-05T22:12:11","modified_gmt":"2021-11-05T22:12:11","slug":"wilderness-road-usb-jump-drive","status":"publish","type":"page","link":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wilderness-road-usb-jump-drive\/","title":{"rendered":"Wilderness Road USB Jump Drive"},"content":{"rendered":"\n<p>Just Off The Wilderness Road USB Jump Drive<br>$15.00<br>Shipping $2.50<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"277\" src=\"https:\/\/justoffthewildernessroad.com\/wp-content\/uploads\/2021\/11\/JumpDrive-300x277.jpg\" alt=\"\" class=\"wp-image-687\" srcset=\"https:\/\/justoffthewildernessroad.com\/wp-content\/uploads\/2021\/11\/JumpDrive-300x277.jpg 300w, https:\/\/justoffthewildernessroad.com\/wp-content\/uploads\/2021\/11\/JumpDrive-1024x947.jpg 1024w, https:\/\/justoffthewildernessroad.com\/wp-content\/uploads\/2021\/11\/JumpDrive-768x710.jpg 768w, https:\/\/justoffthewildernessroad.com\/wp-content\/uploads\/2021\/11\/JumpDrive.jpg 1385w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure><\/div>\n\n\n\n<div id=\"smart-button-container\">\n      <div style=\"text-align: center;\">\n        <div style=\"margin-bottom: 1.25rem;\">\n          <p><\/p>\n          <select id=\"item-options\"><option value=\"Wilderness Road USB Jump Drive\" price=\"15.00\">Wilderness Road USB Jump Drive &#8211; 15.00 USD<\/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><\/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=AWjDXW8NH13u2mmuZzyv6QDqK5T6HScKEpLOX_LcfAwkaYVNBLd_DQaUuuZy_WL7qJaRyZLwRivVo3fx&amp;enable-funding=venmo&amp;currency=USD\" data-sdk-integration-source=\"button-factory\"><\/script>\n    <script>\n      function initPayPalButton() {\n        var shipping = 2.50;\n        var itemOptions = document.querySelector(\"#smart-button-container #item-options\");\n    var quantity = parseInt(5);\n    var quantitySelect = document.querySelector(\"#smart-button-container #quantitySelect\");\n    if (!isNaN(quantity)) {\n      quantitySelect.style.visibility = \"visible\";\n    }\n    var orderDescription = '';\n    if(orderDescription === '') {\n      orderDescription = 'Item';\n    }\n    paypal.Buttons({\n      style: {\n        shape: 'rect',\n        color: 'gold',\n        layout: 'vertical',\n        label: 'paypal',\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: 'USD',\n              value: priceTotal,\n              breakdown: {\n                item_total: {\n                  currency_code: 'USD',\n                  value: itemTotalValue,\n                },\n                shipping: {\n                  currency_code: 'USD',\n                  value: shipping,\n                },\n                tax_total: {\n                  currency_code: 'USD',\n                  value: tax,\n                }\n              }\n            },\n            items: [{\n              name: selectedItemDescription,\n              unit_amount: {\n                currency_code: 'USD',\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>\n","protected":false},"excerpt":{"rendered":"<p>Just Off The Wilderness Road USB Jump Drive$15.00Shipping $2.50 Wilderness Road USB Jump Drive &#8211; 15.00 USD 12345<\/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-689","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/pages\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":3,"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/pages\/689\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/pages\/689\/revisions\/694"}],"wp:attachment":[{"href":"https:\/\/justoffthewildernessroad.com\/Main\/Welcome.html\/wp-json\/wp\/v2\/media?parent=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}