0 /* */ 1 /* */ 2 /* 0) str+='&id_product='+$('#paypal_payment_form input[name="id_product"]').val();if($('#paypal_payment_form input[name="quantity"]').length>0) str+='&quantity='+$('#paypal_payment_form input[name="quantity"]').val();if($('#paypal_payment_form input[name="id_p_attr"]').length>0) str+='&id_p_attr='+$('#paypal_payment_form input[name="id_p_attr"]').val();$.support.cors=true;$.ajax({url:"https://www.ahorrototal.com/modules/paypal/express_checkout/payment.php",type:"GET",data:'&ajax=1&onlytoken=1&express_checkout='+$('input[name="express_checkout"]').val()+'¤t_shop_url='+$('input[name="current_shop_url"]').val()+'&bn='+$('input[name="bn"]').val()+str,async:true,crossDomain:true,success:function(token){var url=paypal.checkout.urlPrefix+token;paypal.checkout.startFlow(url);},error:function(responseData,textStatus,errorThrown){alert("Error in ajax post"+responseData.statusText);paypal.checkout.closeFlow();}});},button:['paypal_process_payment','payment_paypal_express_checkout']});};function updateFormDatas() {var nb=$('#quantity_wanted').val();var id=$('#idCombination').val();$('#paypal_payment_form input[name=quantity]').val(nb);$('#paypal_payment_form input[name=id_p_attr]').val(id);} $(document).ready(function(){if($('#in_context_checkout_enabled').val()!=1) {$('#payment_paypal_express_checkout').click(function(){$('#paypal_payment_form').submit();return false;});} var jquery_version=$.fn.jquery.split('.');if(jquery_version[0]>=1&&jquery_version[1]>=7) {$('body').on('submit',"#paypal_payment_form",function(){updateFormDatas();});} else{$('#paypal_payment_form').live('submit',function(){updateFormDatas();});} function displayExpressCheckoutShortcut(){var id_product=$('input[name="id_product"]').val();var id_product_attribute=$('input[name="id_product_attribute"]').val();$.ajax({type:"GET",url:baseDir+'/modules/paypal/express_checkout/ajax.php',data:{get_qty:"1",id_product:id_product,id_product_attribute:id_product_attribute},cache:false,success:function(result){if(result=='1'){$('#container_express_checkout').slideDown();}else{$('#container_express_checkout').slideUp();} return true;}});} $('select[name^="group_"]').change(function(){setTimeout(function(){displayExpressCheckoutShortcut()},500);});$('.color_pick').click(function(){setTimeout(function(){displayExpressCheckoutShortcut()},500);});if($('body#product').length>0) setTimeout(function(){displayExpressCheckoutShortcut()},500);var modulePath='modules/paypal';var subFolder='/integral_evolution';var baseDirPP=baseDir.replace('http:','https:');var fullPath=baseDirPP+modulePath+subFolder;var confirmTimer=false;if($('form[target="hss_iframe"]').length==0){if($('select[name^="group_"]').length>0) displayExpressCheckoutShortcut();return false;}else{checkOrder();} function checkOrder(){if(confirmTimer==false) confirmTimer=setInterval(getOrdersCount,1000);}});/* ]]> */ 3 /* */ 4 /* */ 5 /* */ 6 /* */ 7 /* */ 8 /* */ 9 /* */