{"id":104,"date":"2017-03-31T14:50:35","date_gmt":"2017-03-31T14:50:35","guid":{"rendered":"http:\/\/studio.cridio.com\/listingpro-content\/payment-checkout\/"},"modified":"2017-03-31T14:50:35","modified_gmt":"2017-03-31T14:50:35","slug":"payment-checkout","status":"publish","type":"page","link":"https:\/\/webmasterdriver.net\/olomo\/payment-checkout\/","title":{"rendered":"Payment Checkout"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"104\" class=\"elementor elementor-104\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6757ba1 elementor-section-stretched elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6757ba1\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2fabda0\" data-id=\"2fabda0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2594a2d elementor-widget elementor-widget-shortcode\" data-id=\"2594a2d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div class=\"page-container-four clearfix\"><div class=\"col-md-10 col-md-offset-1\"><form autocomplete=\"off\" id=\"listings_checkout_form\" class=\"listing-form\" name =\"listings_checkout_form\" action=\"https:\/\/webmasterdriver.net\/olomo\/wp-content\/plugins\/olomo-plugin\/include\/paypal\/form-handler.php?func=addrow\" method=\"post\" data-currencypos=\"\" data-currencysymbol=\"$\"><div class=\"row\"><div class=\"col-md-9\"><p class=\"text-center\">Sorry! You have no paid listings yet!<\/p><\/div><div class=\"col-md-3 col-outer\"><div class=\"rightbnk-transfer-msg rightbnk-transfer-msg-new\"><div class=\"method-wrap\"><label><div class=\"radio radio-danger\">\r\r\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"rd2\" value=\"paypal\">\r\r\r\n\t\t\t\t\t\t\t\t<label for=\"rd2\">\r\r\r\n\t\t\t\t\t\t\t\t \r\r\r\n\t\t\t\t\t\t\t\t<\/label>\r\r\r\n\t\t\t\t\t\t\t<\/div><div class=\"checkout-payment-img\"><img decoding=\"async\" src=\"https:\/\/webmasterdriver.net\/olomo\/wp-content\/themes\/olomo\/assets\/images\/paypal.png\"><\/div><\/label><\/div><div class=\"method-wrap\"><label><div class=\"radio radio-danger\">\r\r\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"rd3\" value=\"stripe\">\r\r\r\n\t\t\t\t\t\t\t\t<label for=\"rd3\">\r\r\r\n\t\t\t\t\t\t\t\t \r\r\r\n\t\t\t\t\t\t\t\t<\/label>\r\r\r\n\t\t\t\t\t\t<\/div><div class=\"checkout-payment-img\"><img decoding=\"async\" src=\"https:\/\/webmasterdriver.net\/olomo\/wp-content\/themes\/olomo\/assets\/images\/stripe.png\"><\/div><\/label><\/div><div class=\"method-wrap\"><label><div class=\"radio radio-danger\">\r\r\r\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"plan\" id=\"paystak_btn\" value=\"paystack\">\r\r\r\n\t\t\t\t\t\t\t\t<label for=\"paystak_btn\">\r\r\r\n\t\t\t\t\t\t\t\t<\/label>\r\r\r\n\t\t\t\t\t\t<\/div><div class=\"checkout-payment-img\"><img decoding=\"async\" src=\"https:\/\/webmasterdriver.net\/olomo\/wp-content\/plugins\/olomo-plugin\/assets\/img\/paystack-icon.png\"><\/div><\/label><\/div><\/div><div class=\"recurring-button-wrap\"><\/div><button type=\"button\" class=\"payment_step_next firstStep\" disabled>PROCEED TO NEXT<\/button><button type=\"button\" class=\"payment_method_reset\" style=\"display:none;\">OTHER PAYMENT METHODS<\/button><button type=\"button\" class=\"payment_step_next paystackBtn\" onclick=\"payWithPaystack()\" style=\"display:none;\">PROCEED TO NEXT<\/button>\r\n\r\n\r\n\t\t\t\t\t\t\t<script src=\"https:\/\/js.paystack.co\/v1\/inline.js\"><\/script>\r\n\r\n\r\n\t\t\t\t\t\t\t<script>\r\n\r\n\r\n\t\t\t\t\t\t\t\tfunction payWithPaystack(){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tvar plan_amount = jQuery(\"#listings_checkout_form input[name=plan_price]\").val();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tplan_amount = plan_amount * 100;\r\n\r\n\r\n\t\t\t\t\t\t\t\t    var handler = PaystackPop.setup({\r\n\r\n\r\n\t\t\t\t\t\t\t\t      key: \"pk_test_3280ab704c89e12273a0375fdbf9c38158aeecc5\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t      email: \"\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t      amount: plan_amount,\r\n\r\n\r\n\t\t\t\t\t\t\t\t      \/\/ currency: \"USD\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t      callback: function(response){\r\n\r\n\r\n\t\t\t\t\t\t\t\t      \t  jQuery(\"body\").addClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t  var listings_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").val();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t  var plan_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"planid\");\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t          jQuery.ajax({\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\ttype: \"POST\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdataType: \"json\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\turl: \"https:\/\/webmasterdriver.net\/olomo\/wp-admin\/admin-ajax.php\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdata: {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"action\": \"olomo_save_paystack\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"token\": response.reference,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"email\": \"\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"listing\": listings_id,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"plan\": plan_id,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"plan_price\": jQuery(\"#listings_checkout_form input[name=plan_price]\").val(),\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tsuccess: function(res){ \/\/alert(res);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\/\/console.log(res);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tredURL = res.redirect;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.href = redURL;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"fail\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(res.redirect);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\terror: function(errorThrown){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\talert(errorThrown);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t\t\t\t      },\r\n\r\n\r\n\t\t\t\t\t\t\t\t      onClose: function(){\r\n\r\n\r\n\t\t\t\t\t\t\t\t          alert(\"window closed\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t      }\r\n\r\n\r\n\t\t\t\t\t\t\t\t    });\r\n\r\n\r\n\t\t\t\t\t\t\t\t    handler.openIframe();\r\n\r\n\r\n\t\t\t\t\t\t\t\t  }\r\n\r\n\r\n\t\t\t\t\t\t\t<\/script>\r\n\r\n\r\n\t\t\t\t\t\t<\/div><\/div><\/form>\r\n\r\n\r\n\t\t\t\t\t\t\t\t<button id=\"stripe-submit\">Purchase<\/button>\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t<script>\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tvar post_title = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tlistings_id = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tlistings_img = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tplan_price = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tcurrency = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tplan_id = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tlisting_img = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tjQuery(\"button.payment_step_next\").click(function(){\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tlistings_id = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tlistings_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").val();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tplan_id = \"\";\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tplan_id = jQuery(\"#listings_checkout_form input[name=listing_id]:checked\").data(\"planid\");\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tvar token_email, token_id;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\tvar handler = StripeCheckout.configure({\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  key: \"pk_test_51RVSQ5FNRYJJN5ITjaBXfsQCFFf433TIXWfa5394Y3HjodaOjMI3TtMPtSyZCElmHDue8MWLLOYiXt5V2u8s2JED00lHwF7ObF\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  image: \"https:\/\/stripe.com\/img\/documentation\/checkout\/marketplace.png\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  locale: \"auto\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  token: function(token) {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tconsole.log(token);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\ttoken_id = token.id;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\ttoken_email = token.email;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").addClass(\"olomo-loading\");\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\tjQuery.ajax({\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\ttype: \"POST\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdataType: \"json\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\turl: \"https:\/\/webmasterdriver.net\/olomo\/wp-admin\/admin-ajax.php\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tdata: {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"action\": \"olomo_save_stripe\",\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"token\": token_id,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"email\": token_email,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"listing\": listings_id,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"plan\": plan_id,\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"plan_price\": jQuery(\"#listings_checkout_form input[name=plan_price]\").val(),\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tsuccess: function(res){ \/\/alert(res);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\/\/console.log(res);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tredURL = res.redirect;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"success\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location.href = redURL;\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(res.status==\"fail\"){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\talert(res.redirect);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t},\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\terror: function(errorThrown){\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\talert(errorThrown);\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery(\"body\").removeClass(\"olomo-loading\");\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  }\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t\/\/ Close Checkout on page navigation:\r\n\r\n\r\n\t\t\t\t\t\t\t\t\twindow.addEventListener(\"popstate\", function() {\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t  handler.close();\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t});\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t<\/script>\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<div class=\"contant\"><\/div>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-104","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/pages\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":0,"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/pages\/104\/revisions"}],"wp:attachment":[{"href":"https:\/\/webmasterdriver.net\/olomo\/wp-json\/wp\/v2\/media?parent=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}