{"id":101,"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:\/\/vbansko.com\/ru\/payment-checkout\/","title":{"rendered":"\u041e\u043f\u043b\u0430\u0442\u0430"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"101\" class=\"elementor elementor-101\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7fe2c16 e-flex e-con-boxed e-con e-parent\" data-id=\"7fe2c16\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\n\t\t<div class=\"elementor-element elementor-element-96b4aba elementor-widget elementor-widget-listing-checkout\" data-id=\"96b4aba\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"listing-checkout.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<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=\"right\" data-currencysymbol=\"\u20ac\"><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\">\r\n\t\t\t\t\t\t\t\t<ul class=\"checkout-item-price-total\">\r\n\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left\"><b>ITEM<\/b><\/span>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right\"><b>PRICE<\/b><\/span>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left lp-subtotal-plan\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right lp-subtotal-p-price\"><\/span>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-left\"><b>Total<\/b><\/span>\r\n\t\t\t\t\t\t\t\t\t\t<span class=\"item-price-total-right lp-subtotal-total-price\"><b><\/b><\/span>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/li>\r\n\r\n\t\t\t\t\t\t\t\t<\/ul>\r\n\r\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\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\" data-src=\"https:\/\/vbansko.com\/wp-content\/themes\/listingpro\/assets\/images\/stripe.png\" width=\"120\" class=\"smush-dimensions lazyload\" style=\"--smush-image-width: 120px; --smush-image-aspect-ratio: 120\/60;\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/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>\r\n\t\t\t\t\t\t<button type=\"button\" class=\"lp_payment_step_next firstStep\" disabled>PROCEED TO NEXT<\/button>\r\n\t\t\t\t\t<\/div><\/div><\/form>\r\n\t\t\t\t\t\t\t<button id=\"stripe-submit\">Purchase<\/button>\r\n\r\n\t\t\t\t\t\t\t\t<script>\r\n\t\t\t\t\t\t\t\tvar post_title = \"\";\r\n\t\t\t\t\t\t\t\tlistings_id = \"\";\r\n\t\t\t\t\t\t\t\tlistings_img = \"\";\r\n\t\t\t\t\t\t\t\tplan_price = \"\";\r\n\t\t\t\t\t\t\t\tcurrency = \"\";\r\n\t\t\t\t\t\t\t\tplan_id = \"\";\r\n\t\t\t\t\t\t\t\tlisting_img = \"\";\r\n\t\t\t\t\t\t\t\ttaxrate = \"\";\r\n\t\t\t\t\t\t\t\tcoupon = \"\";\r\n\t\t\t\t\t\t\t\tjQuery(\"button.lp_payment_step_next\").click(function(){\r\n\t\t\t\t\t\t\t\t\tlistings_id = \"\";\r\n\t\t\t\t\t\t\t\t\tlistings_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").val();\r\n\t\t\t\t\t\t\t\t\tplan_id = \"\";\r\n\t\t\t\t\t\t\t\t\tplan_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"planid\");\r\n\t\t\t\t\t\t\t\t\ttaxrate = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"taxrate\");\r\n                                    coupon = jQuery(\"#listings_checkout_form input[name=coupon-text-field]\").val();\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tvar recurringtext =\"\";\r\n\t\t\t\t\t\t\t\tjQuery(\"#listings_checkout_form\").submit(function(){\r\n\t\t\t\t\t\t\t\t\trecurringtext = jQuery(\"input[name=lp-recurring-option]:checked\").val();\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar token_email, token_id;\r\n\t\t\t\t\t\t\t\tvar handler = StripeCheckout.configure({\r\n\t\t\t\t\t\t\t\t  key: \"pk_test_CWzoQxGab6gCbqVnipQNY3xb\",\r\n\t\t\t\t\t\t\t\t  image: \"https:\/\/stripe.com\/img\/documentation\/checkout\/marketplace.png\",\r\n\t\t\t\t\t\t\t\t  locale: \"auto\",\r\n\t\t\t\t\t\t\t\t  token: function(token) {\r\n\t\t\t\t\t\t\t\t\tconsole.log(token);\r\n\t\t\t\t\t\t\t\t\ttoken_id = token.id;\r\n\t\t\t\t\t\t\t\t\ttoken_email = token.email;\r\n\t\t\t\t\t\t\t\t\tjQuery(\"body\").addClass(\"listingpro-loading\");\r\n\t\t\t\t\t\t\t\t\tjQuery.ajax({\r\n\t\t\t\t\t\t\t\t\t\ttype: \"POST\",\r\n\t\t\t\t\t\t\t\t\t\tdataType: \"json\",\r\n\t\t\t\t\t\t\t\t\t\turl: \"https:\/\/vbansko.com\/wp-admin\/admin-ajax.php\",\r\n\t\t\t\t\t\t\t\t\t\tdata: { \r\n\t\t\t\t\t\t\t\t\t\t\t\"action\": \"listingpro_save_stripe\", \r\n\t\t\t\t\t\t\t\t\t\t\t\"token\": token_id, \r\n\t\t\t\t\t\t\t\t\t\t\t\"email\": token_email, \r\n\t\t\t\t\t\t\t\t\t\t\t\"listing\": listings_id, \r\n\t\t\t\t\t\t\t\t\t\t\t\"plan\": plan_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\"plan_price\": jQuery(\"#listings_checkout_form input[name=plan_price]\").val(),\r\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\r\n\t\t\t\t\t\t\t\t\t\t\t\"coupon\": coupon,\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\"recurring\" : recurringtext,\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t},   \r\n\t\t\t\t\t\t\t\t\t\tsuccess: function(res){\r\n\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\t\t\t\t\t\t\t\t\t\t\t\tredURL = res.redirect;\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.href = redURL;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"fail\"){\r\n\t\t\t\t\t\t\t\t\t\t\t\talert(res.redirect);\r\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\t\terror: function(errorThrown){\r\n\t\t\t\t\t\t\t\t\t\t\talert(errorThrown);\r\n\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"listingpro-loading\");\r\n\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t  }\r\n\t\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\t\t\/\/ Close Checkout on page navigation:\r\n\t\t\t\t\t\t\t\twindow.addEventListener(\"popstate\", function() {\r\n\t\t\t\t\t\t\t\t  handler.close();\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t<\/script>\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-101","page","type-page","status-publish","hentry"],"acf":[],"cubewp_post_meta":[],"taxonomies":[],"_links":{"self":[{"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/pages\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":0,"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/pages\/101\/revisions"}],"wp:attachment":[{"href":"https:\/\/vbansko.com\/ru\/wp-json\/wp\/v2\/media?parent=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}