PageSourceSearch

https://www.regenesys.net/_next/static/chunks/pages/preEnrollmentPaymentFail-4fd3e0bcede3e1be.js

js regenesys.net collected 2026-10-02 05:22:20 UTC 4,390 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[143,616],{616:(e,t,a)=>{"use strict";a.d(t,{j:()=>o});var n=a(78028);let r="https://www.regenesys.net/",l=async(e,t,a,r)=>{try{let d=await n.A.post("".concat("https://rms-api.regenesys.net/api/","pre-enrolment/student/payments/get-hmac-token"),{totalAmount:e,feeModeCode:"APPLICATION",applicationCode:a,studentCode:t,userSelectedProgram:r},{headers:{Authorization:"Bearer ".concat("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtb2R1bGUiOiJwcmUtZW5yb2xtZW50Iiwicm9sZSI6InN1cGVyLXVzZXIiLCJpYXQiOjE3NjkwNzAxOTQsImV4cCI6MTgwMDYyNzc5NH0.FlUo10Xzf7jWzuUZW4tm2GMTZNdrZi9MjNU5Kv37NKY"),"Content-Type":"application/json"}});if(201===d.status&&d.data){var l,o,c,i,s,u;return{token:null==d||null==(o=d.data)||null==(l=o.data)?void 0:l.token,reference:null==d||null==(i=d.data)||null==(c=i.data)?void 0:c.reference,key:null==d||null==(u=d.data)||null==(s=u.data)?void 0:s.key}}throw Error("Invalid response from HMAC token API.")}catch(e){throw e}},o=async(e,t,a,n,o,c)=>{let{token:i,reference:s,key:u}=await l(e,t,a,o),d={currency:"ZAR",method:"Ukheshe",cancelUrl:encodeURI("".concat(r,"preEnrollmentError?reference=").concat(s,"&appCode=").concat(c)),redirectUrl:encodeURI("".concat(r,"preEnrollmentSuccess?reference=").concat(s,"&appCode=").concat(c)),callbackUrl:"https://rms-api.regenesys.net/api/public/payment/cb"};return{key:u,code:t,reference:s,amount:e,currency:d.currency,email:n,cancelurl:d.cancelUrl,callbackUrl:d.callbackUrl,redirecturl:d.redirectUrl,token:i,method:d.method,applicationId:a,userSelectedProgram:o}}},75918:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/preEnrollmentPaymentFail",function(){return a(80982)}])},80982:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var n=a(37876),r=a(60806),l=a(19534),o=a(9146),c=a(46707),i=a(616),s=a(89099),u=a(14232),d=a(31462);let p=()=>{let e=(0,s.useRouter)(),[t,a]=(0,u.useState)(null),[p,m]=(0,u.useState)(null),[y,f]=(0,u.useState)(null),[h,g]=(0,u.useState)(!1),[I,w]=(0,u.useState)(!0);(0,u.useEffect)(()=>{let e=setTimeout(()=>{w(!1)},3e3);return()=>clearTimeout(e)},[]),(0,u.useEffect)(()=>{{let e=localStorage.getItem("formData"),t=localStorage.getItem("totalFee");e&&a(JSON.parse(e)),t&&f(t);let n=localStorage.getItem("regData");n&&m(JSON.parse(n))}},[]);let N=async()=>{try{let e=null==p?void 0:p.newRegId,a=null==p?void 0:p.applicationId,n=null==p?void 0:p.applicationCode,r=null==t?void 0:t.email,l=null==t?void 0:t.Programme_Of_Interest,o=await (0,i.j)(y,e,a,r,l,n);if(!o)return void g(!1);let c=document.createElement("form");c.action="https://paymentshub.finedtech.net/payments/initiate",c.method="POST",Object.keys(o).forEach(e=>{let t=document.createElement("input");t.type="hidden",t.name=e,t.value=String(o[e]),c.appendChild(t)}),document.body.appendChild(c),c.submit()}catch(t){g(!1),setTimeout(()=>{e.push("/preEnrollmentPaymentFail")},5e3)}};return((0,u.useEffect)(()=>{if(!(null==p?void 0:p.newRegId))return;let e=localStorage.getItem("flexiPayFunnelStartedAt"),t=e?Number(e):null,a=null==t||Number.isNaN(t)?0:Math.max(0,Math.round((Date.now()-t)/6e4));(0,d.NH)({regid:p.newRegId,sessionDurationMinutes:a})},[p]),I)?(0,n.jsx)(r.A,{}):h?(0,n.jsx)(l.A,{}):(0,n.jsx)("div",{children:(0,n.jsx)(o.default,{backGround:"linear-gradient(270deg, rgba(247, 239, 240, 0) 0%, #f7eff0 25%, #f7eff0 50%, #f7eff0 75%, rgba(247, 239, 240, 0) 100%)",icon:"/assets/payment.png",title:"",header:"Payment Session Expired",description:"It seems like your payment session has timed out. Please restart the payment process to secure your application. If you face any issues, feel free to contact our support team at [[email protected]].",buttonName:"Retry Payment",handleRetryPayment:async()=>{(0,c.MP)("retry_payment_clicked",{page_name:"payment_fail",error_code:"session_expired"});let e=localStorage.getItem("flexiPayRetryAttempt"),t=(e?Number(e):0)+1;localStorage.setItem("flexiPayRetryAttempt",String(t)),(null==p?void 0:p.newRegId)&&(0,d.Ei)({regid:p.newRegId,retryAttemptNumber:t,errorType:"session_expired"}),await N()}})})}}},e=>{e.O(0,[8779,563,5019,7708,175,9236,181,5127,8544,3494,2574,2903,9173,9519,1982,7212,6035,8907,9473,9401,535,1626,7569,2901,6081,2959,1874,5365,6843,1507,8631,8219,8442,3203,5322,8486,3289,4012,5005,645,3602,1221,4937,6199,2828,8884,2190,659,9995,2410,2317,9539,8302,5155,636,7170,2837,8792],()=>e(e.s=75918)),_N_E=e.O()}]);

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.