/*! For license information please see payment_ppp.js.LICENSE */
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}({8:function(e,t){var n={},o=!0;$(document).ready((function(){$("#checkout-payment-step").hasClass("js-current-step")&&function e(){var t;"undefined"!=typeof PAYPAL?(t=!1,"sandbox"==modePPP&&(t=!0),n=PAYPAL.apps.PPP({approvalUrl:approvalUrlPPP,placeholder:"ppplus",mode:modePPP,language:languageIsoCodePPP,country:countryIsoCodePPP,buttonLocation:"outside",useraction:"continue",showPuiOnSandbox:t})):setTimeout(e,200)}(),$("#payment-confirmation button").on("click",(function(e){var t=$("input[name=payment-option]:checked").attr("id");$("#".concat(t,"-additional-information .payment_module")).hasClass("paypal-plus")&&(e.preventDefault(),e.stopPropagation(),r())}))}));var r=function(){if(o){o=!1;try{$.fancybox.open({content:'<div id="popup-ppp-waiting"><p>'.concat(waitingRedirectionMsg,"</p></div>"),closeClick:!1,height:"auto",helpers:{overlay:{closeClick:!1}}})}catch(e){document.querySelector("#payment-confirmation button").disabled=!0}$.ajax({type:"POST",url:ajaxPatchUrl,dataType:"json",data:{idPayment:idPaymentPPP},success:function(e){e.success?n.doCheckout():window.location.replace(e.redirect_link)}})}}}});
//# sourceMappingURL=payment_ppp.js.map