PageSourceSearch

https://epson.com.co/_ui/_v202608182013/responsive/common/js/acc.paymentDetails.min.js

js epson.com.co collected 2026-10-03 21:46:46 UTC 6,191 bytes, 1 lines download raw bytes

1ACC.paymentDetails={_autoload:["showRemovePaymentDetailsConfirmation","bindPaymentCreditCardAddressForm","displayPaymentCreditCardAddressForm","loadPreFilledPaymetricValues","bindPaymetricFunctionality","bindCouponForm","updateCouponApplyButton","isCardValid"],bindCouponForm:function(){$("#epsonCouponForm").on("submit",function(){console.log($("#couponCode-error").val());if($("#couponCode")==undefined||$("#couponCode").val()==""||$("#couponCode").val()=="undefined"){$("#couponApply").prop("disabled",false)}else{$("#couponApply").attr("disabled","disabled")}})},updateCouponApplyButton:function(){$("#couponApply").prop("disabled",false)},showRemovePaymentDetailsConfirmation:function(){$(document).on("click",".removePaymentDetailsButton",function(){var a=$(this).data("paymentId");var b=$(this).data("popupTitle");ACC.colorbox.open(b,{inline:true,transition:"elastic",href:"#popup_confirm_payment_removal_"+a,onComplete:function(){$(this).colorbox.resize()}})})},bindPaymentCreditCardAddressForm:function(){if($("#displayPaymentCountry").val()==""){var c=$('#address\\.country option[value!=""]');var d=c.val();var a=c.text().trim();$("#displayPaymentCountry").val(a);console.log("selected country value"+a+d);$("#address\\.country").val(d);var b={addressCode:"",countryIsoCode:d};if(b.countryIsoCode){ACC.paymentDetails.displayPaymentCreditCardAddressForm(b,ACC.paymentDetails.showAddressFormButtonPanel)}}},displayPaymentCreditCardAddressForm:function(a,b){form_ctl.funcs.doValidate_paymentDetailsForm();if(a!=undefined){$.ajax({url:ACC.config.encodedContextPath+"/my-account/paymentaddressform",async:true,data:a,dataType:"html",beforeSend:function(){console.log("options being sent"+a)}}).done(function(c){$("#paymentAddressForm").html($(c).html());if(typeof b=="function"){b.call()}form_ctl.funcs.doValidate_paymentDetailsForm()})}},submit_addNewPaymentDetailsButton:function(){var a=$("#pm_RequestForm").valid();var b=$("#paymentDetailsForm").valid();if(!a||!b){return false}if($(".submit_addNewPaymentDetailsButton").length>0){ACC.paymentDetails.submitPaymentData()}else{ACC.common.blockFormAndShowProcessingMessage($(this));$(".paymentAddressForm").filter(":hidden").remove();ACC.paymentDetails.enableAddressForm();console.log("submitting the billing address form");$("#silentOrderPostForm").submit()}},shouldHideErrorBox:function(b){var a=true;b.siblings().each(function(){if(!$(this).hasClass("hidden")){a=false}});return a},bindPaymetricFunctionality:function(){function a(b){return document.getElementById("DIeCommFrame").contentWindow.document.getElementById(b)}$("#Paymetric_ErrorLogging").on("DOMSubtreeModified",function(){if($("#Paymetric_ErrorLogging")!=null&$("#Paymetric_ErrorLogging").children().length>0){$("#paymetricError").html($("#Paymetric_ErrorLogging").html());var c=$("#paymetricCreditCardErrorMsg").val().trim();var d=$("#paymetricError");var b=d.text().replace(/<br\s*\/?>/g,"").trim();d.text(b);if(b.includes("Credit Card Number!")||b.includes("CVV!")||b.includes("Exp Date!")){d.text(c)}d.show();$(".first-view").addClass("show-view");$(".second-view").removeClass("show-view");$(".second-view").css("display","none")}else{$("#paymetricError").hide()}});$("#pm_cc_number").on("keyup",function(){$("#paymetricCardNumberError").hide();var b=form_ctl.funcs.check_cc_type($(this).val());$("#pm_CreditCardType").val(b)})},fillPaymetricField:function(b,c,d){var a="#"+b;if(($el=$(a)).length){$el.val(c)}$(d).val(c)},loadPreFilledPaymetricValues:function(){$("#pm_start_month").val($("#Paymetric_Exp_Month").val());if(helpers.rm_if_blank($("#Paymetric_Exp_Year").val()).length==4){$("#pm_exp_year").val($("#Paymetric_Exp_Year").val().substring(2,4))}else{$("#pm_exp_year").val($("#Paymetric_Exp_Year").val())}var a=$("#Paymetric_CreditCardNumber").val();$("#pm_cc_number").val(a);if(!(a==undefined||a=="")&&(a.startsWith("************"))){$("#pm_RequestForm").toggleClass("prefilled",true)}},submitPaymentData:function(){$("#paymetricError").hide();if(typeof $XIPlugin==="undefined"||!$XIPlugin.createJSRequestPacket){console.error("XIPlugin is not available or initialized!");$("#paymetricError").show();return}
1var b=$("#pm_cc_number").val();var a=$("#addressfirstName").val();var e=$("#pm_start_month").val();var g=$("#pm_exp_year").val();var k=$("#pm_ccv").val();var i=$("#pm_CreditCardType").val();var h=$("#accessToken").val();var c=$("#pm_merchantGuid").val();if(!b||b.trim()===""||!a||a.trim()===""||!h||h.trim()===""||!c||c.trim()===""){$("#paymetricError").show();return}const j=ACC.paymentDetails.isCardValid(b,i);if(j>0){$("#paymetricCardNumberError").show();document.getElementById("paymetricCardNumberError").scrollIntoView({behavior:"smooth"});return}var f=$XIPlugin.createJSRequestPacket(c,h);f.addField($XIPlugin.createField("PaymentCreditCard",true,b));f.addField($XIPlugin.createField("name",false,a));f.addField($XIPlugin.createField("month",false,e));f.addField($XIPlugin.createField("year",false,g));f.addField($XIPlugin.createField("ccv",false,k));f.addField($XIPlugin.createField("ccType",false,i));var d={data:f};$XIPlugin.ajax({url:$(".js-ajxEndpoint").val(),data:f,type:"POST",success:function(l){console.log("Response from server:",l);$("#paymentDetailsForm").submit()},error:function(n,l,m){console.error("Error during request:",m);$("#paymetricError").show();$("#accessToken").val("")},beforeSend:function(){}})},isCardValid:function(h,c){var b=new Array();b[0]={name:"4000",regex:/^(4)([0-9]{12}|[0-9]{15})$/,checkdigit:true};b[1]={name:"5000",regex:/^(36|51|52|53|54|55)([0-9]{12}|[0-9]{14})$/,checkdigit:true};b[2]={name:"3000",regex:/(34|37)([0-9]{13})$/,checkdigit:true};b[3]={name:"6000",regex:/(^(64|65|66)([0-9]{12}|[0-9]{14})$)|(^(622|624|625|626|628)([0-9]{11}|[0-9]{13})$)|(^(6011)([0-9]{10}|[0-9]{12})$)$/,checkdigit:true};var a=-1;for(var f=0;f<b.length;f++){if(c.toLowerCase()==b[f].name.toLowerCase()){a=f;break}}if(a==-1){return 1}if(h.length==0){return 1}h=h.replace(/\s/g,"");var m=h;var k=b[a].regex;if(!k.test(m)){return 1}if(b[a].checkdigit){var g=0;var l="";var e=1;var d;for(f=m.length-1;f>=0;f--){d=Number(m.charAt(f))*e;if(d>9){g=g+1;d=d-10}g=g+d;if(e==1){e=2}else{e=1}}if(g%10!=0){return 2}}return 0}};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.