/*! For license information please see forte-ach-payment.js.LICENSE.txt */ (()=>{function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}new function n(t){var o=this;!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),e(this,"handleAuthorization",(function(){var e=document.getElementById("account-number").value,n=document.getElementById("routing-number").value,t={api_login_id:o.apiLoginId,account_number:e,routing_number:n,account_type:"checking"};return document.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(t).success(o.successResponseHandler).error(o.failedResponseHandler),!1})),e(this,"successResponseHandler",(function(e){return document.getElementById("payment_token").value=e.onetime_token,document.getElementById("server_response").submit(),!1})),e(this,"failedResponseHandler",(function(e){var n='
";return document.getElementById("forte_errors").innerHTML=n,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1})),e(this,"handle",(function(){var e=document.getElementById("pay-now");return e&&e.addEventListener("click",(function(e){o.handleAuthorization()})),o})),this.apiLoginId=t}(document.querySelector('meta[name="forte-api-login-id"]').content).handle()})();