1document.addEventListener("DOMContentLoaded", function () { 2 const triggerLink = document.querySelector("#triggerRegistrationPayment"); 3 if (!triggerLink) return; 4 5 triggerLink.addEventListener("click", function (e) { 6 e.preventDefault(); 7 8 fetch(membershipRegisterUrl, { 9 method: "POST", 10 headers: { 11 "X-CSRF-TOKEN": formData.get("_token"), 12 Accept: "application/json", 13 }, 14 body: formData, 15 }) 16 .then((response) => response.json()) 17 .then((data) => { 18 console.log(data); 19 if (data.status && data.data && data.data.authorization_url) { 20 window.location.href = data.data.authorization_url; 21 return; 22 } else { 23 let errorMsg = data.message || 'Unable to initialize payment. Please try again.'; 24 if(data.trace) { 25 errorMsg += "\n" + data.trace; 26 } 27 alert(errorMsg); 28 } 29 }) 30 .catch(() => alert("An error occurred. Please try again.")); 31 }); 32}); 33 34function showToast(message) { 35 var toast = document.createElement("div"); 36 toast.innerText = message; 37 toast.style.position = "fixed"; 38 toast.style.top = "30px"; 39 toast.style.left = "50%"; 40 toast.style.transform = "translateX(-50%)"; 41 toast.style.background = "orange"; 42 toast.style.color = "#fff"; 43 toast.style.padding = "16px 32px"; 44 toast.style.borderRadius = "6px"; 45 toast.style.fontSize = "1.1rem"; 46 toast.style.zIndex = "9999"; 47 toast.style.boxShadow = "0 2px 8px rgba(0,0,0,0.15)"; 48 document.body.appendChild(toast); 49 setTimeout(function () { 50 toast.remove(); 51 }, 1800); 52}
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.