{"id":108,"date":"2020-01-01T12:48:33","date_gmt":"2020-01-01T12:48:33","guid":{"rendered":"http:\/\/localhost\/demo\/payment-checkout\/"},"modified":"2020-01-01T12:48:33","modified_gmt":"2020-01-01T12:48:33","slug":"payment-checkout","status":"publish","type":"page","link":"https:\/\/panicover.co.uk\/?page_id=108","title":{"rendered":"Payment Checkout"},"content":{"rendered":"<p>[vc_row row_type=&#8221;row_full_center_content&#8221; bg_color=&#8221;#eff3f6&#8243; bg_repeat=&#8221;no-repeat&#8221; bg_attatch=&#8221;scroll&#8221;][vc_column]<div class=\"page-container-four clearfix\"><div class=\"col-md-10 col-md-offset-1\"><div class=\"lp_payment_steps_area\">\r\n\t<!-- timeline on checkout page -->\r\n\t<ol class=\"lp-checkout-steps\">\r\n\t  <li class=\"firstStep\"><span class=\"number\">1<\/span><span class=\"description\">SELECT PAYMENT<\/span><\/li>\r\n\t  <li class=\"secondStep\"><span class=\"number\">2<\/span><span class=\"description\">REVIEW PAYMENT<\/span><\/li>\r\n\t  <li class=\"thirdStep\"><span class=\"number\">3<\/span><span class=\"description\">DONE<\/span><\/li>\r\n\t<\/ol>\r\n<\/div><form autocomplete=\"off\" id=\"listings_checkout_form\" class=\"lp-listing-form\" name =\"listings_checkout_form\" action=\"\" method=\"post\" data-recurring=\"yes\" data-currencypos=\"left\" data-currencysymbol=\"$\"><div class=\"row\"><div class=\"col-md-8\"><p class=\"text-center\">Sorry! You have no paid listings yet!<\/p><div class=\"lp-checkout-coupon-outer\">\n\t\t\t\t\t\t\t\t<ul class=\"checkout-item-price-total\">\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left\"><b>ITEM<\/b><\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right\"><b>PRICE<\/b><\/span>\n\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left lp-subtotal-plan\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right lp-subtotal-p-price\"><\/span>\n\n\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left\">Tax(Value Added Tax)<\/span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right lp-subtotal-taxamount\"><\/span>\n\n\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left\"><b>Total<\/b><\/span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right lp-subtotal-total-price\"><b><\/b><\/span>\n\n\t\t\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t\t\t\t<\/ul>\n\n\t\t\t\t\t\t<\/div><\/div><div class=\"col-md-4 lp-col-outer\"><div class=\"lp-rightbnk-transfer-msg lp-rightbnk-transfer-msg-new\"><div class=\"lp-method-wrap\"><label><div class=\"radio radio-danger\">\r\n\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"rd1\" value=\"wire\">\r\n\t\t\t\t\t\t<label for=\"rd1\">\r\n\t\t\t\t\t\t<\/label>\r\n\t\t\t\t\t<\/div><p>Bank Transfer<\/p><div class=\"lp-checkout-payment-img\"><img decoding=\"async\" alt=\"image\" src=\"https:\/\/panicover.co.uk\/wp-content\/themes\/listingpro\/assets\/images\/bank_transfer.png\"><\/div><\/label><div class=\"lp-tranfer-info\"><\/div><\/div><div class=\"lp-method-wrap\"><label><div class=\"radio radio-danger\">\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"rd2\" value=\"paypal\">\r\n\t\t\t\t\t\t\t\t<label for=\"rd2\">\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<\/label>\r\n\t\t\t\t\t\t\t<\/div><p>Paypal<\/p><div class=\"lp-checkout-payment-img\"><img decoding=\"async\" alt=\"image\" src=\"https:\/\/panicover.co.uk\/wp-content\/themes\/listingpro\/assets\/images\/paypal.png\"><\/div><\/label><\/div><div class=\"lp-method-wrap\"><label><div class=\"radio radio-danger\">\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"rd3\" value=\"stripe\">\r\n\t\t\t\t\t\t\t\t<label for=\"rd3\">\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<\/label>\r\n\t\t\t\t\t\t<\/div><p>Stripe<\/p><div class=\"lp-checkout-payment-img\"><img decoding=\"async\" alt=\"image\" src=\"https:\/\/panicover.co.uk\/wp-content\/themes\/listingpro\/assets\/images\/stripe.png\"><\/div><\/label><\/div><div class=\"lp-method-wrap lp-checkout-recurring-wrap\">\r\n                            <div class=\"lp-checkout-coupon-code\">\r\n                                <div class=\"lp-onoff-switch-checkbox\">\r\n                                    <label class=\"switch-checkbox-label\">\r\n                                        <input type=\"checkbox\" name=\"lp-recurring-option\" value=\"yes\" >\r\n                                        <span class=\"switch-checkbox-styling\">\r\n                                        <\/span>\r\n                                    <\/label>\r\n                                <\/div>\r\n                                <span class=\"lp-text-switch-checkbox\">Recurring Payment<\/span><\/div><\/div><\/div><div class=\"lp-recurring-button-wrap\"><\/div>\n\t\t\t\t\t\t<button type=\"button\" class=\"lp_payment_step_next firstStep\" disabled>PROCEED TO NEXT<\/button>\n\t\t\t\t\t<\/div><\/div><\/form>\n\t\t\t\t\t\t\t<button id=\"stripe-submit\">Purchase<\/button>\n\n\t\t\t\t\t\t\t\t<script>\n\t\t\t\t\t\t\t\tvar post_title = \"\";\n\t\t\t\t\t\t\t\tlistings_id = \"\";\n\t\t\t\t\t\t\t\tlistings_img = \"\";\n\t\t\t\t\t\t\t\tplan_price = \"\";\n\t\t\t\t\t\t\t\tcurrency = \"\";\n\t\t\t\t\t\t\t\tplan_id = \"\";\n\t\t\t\t\t\t\t\tlisting_img = \"\";\n\t\t\t\t\t\t\t\ttaxrate = \"\";\n\t\t\t\t\t\t\t\tcoupon = \"\";\n\t\t\t\t\t\t\t\tjQuery(\"button.lp_payment_step_next\").click(function(){\n\t\t\t\t\t\t\t\t\tlistings_id = \"\";\n\t\t\t\t\t\t\t\t\tlistings_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").val();\n\t\t\t\t\t\t\t\t\tplan_id = \"\";\n\t\t\t\t\t\t\t\t\tplan_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"planid\");\n\t\t\t\t\t\t\t\t\ttaxrate = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"taxrate\");\n                                    coupon = jQuery(\"#listings_checkout_form input[name=coupon-text-field]\").val();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tvar recurringtext =\"\";\n\t\t\t\t\t\t\t\tjQuery(\"#listings_checkout_form\").submit(function(){\n\t\t\t\t\t\t\t\t\trecurringtext = jQuery(\"input[name=lp-recurring-option]:checked\").val();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar token_email, token_id;\n\t\t\t\t\t\t\t\tvar handler = StripeCheckout.configure({\n\t\t\t\t\t\t\t\t  key: \"pk_test_CWzoQxGab6gCbqVnipQNY3xb\",\n\t\t\t\t\t\t\t\t  image: \"https:\/\/stripe.com\/img\/documentation\/checkout\/marketplace.png\",\n\t\t\t\t\t\t\t\t  locale: \"auto\",\n\t\t\t\t\t\t\t\t  token: function(token) {\n\t\t\t\t\t\t\t\t\tconsole.log(token);\n\t\t\t\t\t\t\t\t\ttoken_id = token.id;\n\t\t\t\t\t\t\t\t\ttoken_email = token.email;\n\t\t\t\t\t\t\t\t\tjQuery(\"body\").addClass(\"listingpro-loading\");\n\t\t\t\t\t\t\t\t\tjQuery.ajax({\n\t\t\t\t\t\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\t\t\t\t\turl: \"https:\/\/panicover.co.uk\/wp-admin\/admin-ajax.php\",\n\t\t\t\t\t\t\t\t\t\tdata: { \n\t\t\t\t\t\t\t\t\t\t\t\"action\": \"listingpro_save_stripe\", \n\t\t\t\t\t\t\t\t\t\t\t\"token\": token_id, \n\t\t\t\t\t\t\t\t\t\t\t\"email\": token_email, \n\t\t\t\t\t\t\t\t\t\t\t\"listing\": listings_id, \n\t\t\t\t\t\t\t\t\t\t\t\"plan\": plan_id,\n\t\t\t\t\t\t\t\t\t\t\t\"plan_price\": jQuery(\"#listings_checkout_form input[name=plan_price]\").val(),\n\t\t\t\t\t\t\t\t\t\t\t\"taxrate\": jQuery(\"#listings_checkout_form input[name=listings_tax_price]\").val(),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\"coupon\": coupon,\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\"recurring\" : recurringtext,\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},   \n\t\t\t\t\t\t\t\t\t\tsuccess: function(res){\n\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\n\t\t\t\t\t\t\t\t\t\t\t\tredURL = res.redirect;\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.href = redURL;\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"fail\"){\n\t\t\t\t\t\t\t\t\t\t\t\talert(res.redirect);\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\terror: function(errorThrown){\n\t\t\t\t\t\t\t\t\t\t\talert(errorThrown);\n\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\/\/ Close Checkout on page navigation:\n\t\t\t\t\t\t\t\twindow.addEventListener(\"popstate\", function() {\n\t\t\t\t\t\t\t\t  handler.close();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t<\/script>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t[\/vc_column][\/vc_row]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row row_type=&#8221;row_full_center_content&#8221; bg_color=&#8221;#eff3f6&#8243; bg_repeat=&#8221;no-repeat&#8221; bg_attatch=&#8221;scroll&#8221;][vc_column][\/vc_column][\/vc_row]<\/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-108","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/panicover.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/panicover.co.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/panicover.co.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/panicover.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/panicover.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=108"}],"version-history":[{"count":0,"href":"https:\/\/panicover.co.uk\/index.php?rest_route=\/wp\/v2\/pages\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/panicover.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}