| Server IP : 198.38.94.67 / Your IP : 216.73.217.74 Web Server : LiteSpeed System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64 User : azfilmst ( 1070) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/azfilmst/royalopus.ae/wp-content/themes/wpresidence/js/ |
Upload File : |
function wpestate_start_stripe(e,t){function r(){o.createToken(c).then(function(e){if(e.error){var t=document.getElementById("card-errors");t.textContent=e.error.message}else s(e.token)})}function a(){setTimeout(function(){jQuery("#wpestate_stripe_alert").hide(),jQuery("#wpestate_stripe_alert_succes").show(),setTimeout(function(){jQuery("#wpestate_stripe_booking").length>0?window.open(wpestate_stripe_vars.redirect,"_self",!1):jQuery("#wpestate_stripe_form_button_sumit").length>0?location.reload():window.open(wpestate_stripe_vars.redirect_list,"_self",!1)},3e3)},7e3)}function n(e){var t=wpestate_stripe_vars.admin_url+"admin-ajax.php";o.confirmCardPayment(e.payment_intent_secret,{payment_method:{card:c,billing_details:{name:_.value}}}).then(function(r){"succeeded"===r.paymentIntent.status&&jQuery.ajax({type:"POST",url:t,dataType:"json",data:{action:"wpestate_stripe_reccuring_3ds",packId:e.packId,responseId:r.paymentIntent.id,customer_id:e.customer_id,stripe_subscription_id:e.stripe_subscription_id},success:function(e){a()},error:function(e){}})})}function s(e){var t=wpestate_stripe_vars.admin_url+"admin-ajax.php",r=jQuery("#pack_title").val(),s=jQuery("#pack_id").val(),o=jQuery("#wpestate_payments_nonce").val(),i=jQuery("#pay_ammout").val(),c=0;jQuery("#pack_recuring").prop("checked")&&(c=1),jQuery.ajax({type:"POST",url:t,dataType:"json",data:{action:"wpestate_stripe_recurring",packName:r,packId:s,token:e.id,onetime:c,packValue:i,security:o},success:function(e){"complete"===e.answer?a():"3ds"===e.answer?n(e):jQuery("#wpestate_stripe_alert").empty().show().text(wpestate_stripe_vars.pay_failed)},error:function(e){}})}e=parseInt(e);var o=Stripe(wpestate_stripe_vars.pub_key),i=o.elements({fonts:[{cssSrc:"https://fonts.googleapis.com/css?family=Roboto"}],locale:"auto"}),c=i.create("card",{iconStyle:"solid",style:{base:{iconColor:"#c4f0ff",color:"#fff",fontWeight:500,fontFamily:"Roboto, Open Sans, Segoe UI, sans-serif",fontSize:"16px",fontSmoothing:"antialiased",":-webkit-autofill":{color:"#fce883"},"::placeholder":{color:"#87BBFD"}},invalid:{iconColor:"#FFC7EE",color:"#FFC7EE"}}});if(jQuery("#"+t+" .wpestate_form1-card").length>0){if(c.mount("#"+t+" .wpestate_form1-card"),0===e){var p=document.getElementById(t);c.addEventListener("change",function(e){var t=p.querySelector("#card-errors");e.error?t.textContent=e.error.message:t.textContent=""});var _=p.querySelector("#wpestate_form_name"),u=p.querySelector("#wpestate_stripe_form_button_sumit"),d=u.dataset.secret}else{c.addEventListener("change",function(e){var t=document.getElementById("card-errors");e.error?t.textContent=e.error.message:t.textContent=""});_=document.getElementById("wpestate_form_name"),u=document.getElementById("wpestate_stripe_form_button_sumit"),d=u.dataset.secret}u.removeEventListener("click",function(e){}),u.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation();var n=jQuery(this).parent();n.find("#wpestate_stripe_alert").show(),1===e?r():o.handleCardPayment(d,c,{payment_method_data:{billing_details:{name:_.value}}}).then(function(e){e.error?jQuery("#wpestate_stripe_alert").empty().show().text(wpestate_stripe_vars.pay_failed):a()})})}}